It is currently April 26th, 2024, 3:53 am

LeftMouseDownAction Execute

Get help with creating, editing & fixing problems with skins
Honimoura
Posts: 94
Joined: April 3rd, 2018, 11:15 am

Re: LeftMouseDownAction Execute

Post by Honimoura »

If you check here : https://forum.rainmeter.net/viewtopic.php?f=5&t=14325&start=10
In 2018 You have already helped me with the same kind of menu, having the same problem. But even doing the same solution again, it doesn't work ...
Honimoura
Posts: 94
Joined: April 3rd, 2018, 11:15 am

Re: LeftMouseDownAction Execute

Post by Honimoura »

Ok i have find the problem... The correct syntaxe is :

Code: Select all

LeftMouseUpAction=["#@#Raccourcis\[#URL1#]"]
User avatar
balala
Rainmeter Sage
Posts: 16172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: LeftMouseDownAction Execute

Post by balala »

Honimoura wrote: September 28th, 2020, 11:26 pm Ok i have find the problem... The correct syntaxe is :

Code: Select all

LeftMouseUpAction=["#@#Raccourcis\[#URL1#]"]
:o Is extremely weird if this does work, but if you say so, let it be. :o So, is the issue fixed?
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: LeftMouseDownAction Execute

Post by eclectic-tech »

balala wrote: September 29th, 2020, 3:16 pm :o Is extremely weird if this does work, but if you say so, let it be. :o So, is the issue fixed?
The weird syntax is needed because the variable is set to the name of a measure without brackets in the [Variables] section of 'scanLINK.ini' included file. All of those URL# variables should have brackets, and I believe the RCI# variables also need them; this avoids the confusion caused by setting a variable to a MEASURE SECTION NAME only without telling Rainmeter you are referencing an actual measure in the code.

I would recommend to save any included files with .inc extension; as .ini they show in the skin list, but fail to run since they have no METERS.

Original (doesn't work)...

Code: Select all

[Variables]
folderpath=#@#Raccourcis
RCI1=MeasureName1
RCI2=MeasureName2
RCI3=MeasureName3
RCI4=MeasureName4
RCI5=MeasureName5
RCI6=MeasureName6
RCI7=MeasureName7
RCI8=MeasureName8
RCI9=MeasureName9
RCI10=MeasureName10
URL1=CalculeURL1
URL2=CalculeURL2
URL3=CalculeURL3
URL4=CalculeURL4
URL5=CalculeURL5
URL6=CalculeURL6
URL7=CalculeURL7
URL8=CalculeURL8
URL9=CalculeURL9
URL10=CalculeURL10
Link1=Game1LNK1
...
This works and properly sets the variables to measures (not just the section name)...

Code: Select all

[Variables]
folderpath=#@#Raccourcis
RCI1=[MeasureName1]
RCI2=[MeasureName2]
RCI3=[MeasureName3]
RCI4=[MeasureName4]
RCI5=[MeasureName5]
RCI6=[MeasureName6]
RCI7=[MeasureName7]
RCI8=[MeasureName8]
RCI9=[MeasureName9]
RCI10=[MeasureName10]
URL1=[CalculeURL1]
URL2=[CalculeURL2]
URL3=[CalculeURL3]
URL4=[CalculeURL4]
URL5=[CalculeURL5]
URL6=[CalculeURL6]
URL7=[CalculeURL7]
URL8=[CalculeURL8]
URL9=[CalculeURL9]
URL10=[CalculeURL10]
Link1=Game1LNK1
...
Then the expected syntax will work: LeftMouseUpAction=["#@#Raccourcis\#URL1#"]
User avatar
balala
Rainmeter Sage
Posts: 16172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: LeftMouseDownAction Execute

Post by balala »

eclectic-tech wrote: September 29th, 2020, 5:55 pm The weird syntax is needed because the variable is set to the name of a measure without brackets in the [Variables] section of 'scanLINK.ini' included file.
Very good point. Didn't realize this, but it definitely makes sense. :thumbup:
eclectic-tech wrote: September 29th, 2020, 5:55 pm I would recommend to save any included files with .inc extension; as .ini they show in the skin list, but fail to run since they have no METERS.
Good point as well. Not mentioning that this is always recommended.
eclectic-tech wrote: September 29th, 2020, 5:55 pm Then the expected syntax will work: LeftMouseUpAction=["#@#Raccourcis\#URL1#"]
This is not a needed step. If the code is desingned to work the way it does, this is an unwanted complication, in my opinion.
User avatar
Yincognito
Rainmeter Sage
Posts: 7164
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: LeftMouseDownAction Execute

Post by Yincognito »

balala wrote: September 29th, 2020, 3:16 pm :o Is extremely weird if this does work, but if you say so, let it be. :o So, is the issue fixed?
It's not weird at all, if you instead write it LeftMouseUpAction=["#@#Raccourcis\[&[#URL1]]"] - which is how I would have done it in the first place, to avoid syntax confusion.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: LeftMouseDownAction Execute

Post by balala »

Yincognito wrote: October 8th, 2020, 11:38 am It's not weird at all, if you instead write it LeftMouseUpAction=["#@#Raccourcis\[&[#URL1]]"] - which is how I would have done it in the first place, to avoid syntax confusion.
Alright, in meantime I understood eclectic-tech's explanation on how the above LeftMouseUpAction does work.
User avatar
Yincognito
Rainmeter Sage
Posts: 7164
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: LeftMouseDownAction Execute

Post by Yincognito »

balala wrote: October 8th, 2020, 11:45 am Alright, in meantime I understood eclectic-tech's explanation on how the above LeftMouseUpAction does work.
I know you did. I just mentioned a way of writing it that is less confusing. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16172
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: LeftMouseDownAction Execute

Post by balala »

Yincognito wrote: October 8th, 2020, 12:00 pm I know you did. I just mentioned a way of writing it that is less confusing. ;-)
Alright, thanks. :thumbup:
Honimoura
Posts: 94
Joined: April 3rd, 2018, 11:15 am

Re: LeftMouseDownAction Execute

Post by Honimoura »

Hello, sorry I didn't answer earlier.
Yes the problem has been solved.
Another problem arose but I didn't have time to deal with it until today.

With the name of a file I created this code to recover its extension:

Code: Select all

[CalculeLNKtoEXTIMG2]
Measure=Plugin
Plugin=FileView3
Path=[MeasureFolderEXTIMG]
Type=FileName
Index=2
IfMatch=.*jpg.*
IfMatchAction=[!SetOption EXT2 String ".jpg"]
IfMatch2=.*jpeg.*
IfMatchAction2=[!SetOption EXT2 String ".jpeg"]
IfMatch3=.*png.*
IfMatchAction3=[!SetOption EXT2 String ".png"]
IfMatchMode=1
DynamicVariables=1
However for some reason that escapes me, "EXT2" is not equal to one of the extensions (.jpg, .jpeg or .png) but to the name of the entire file ...