It is currently December 3rd, 2022, 1:02 pm

LeftMouseUpAction within an IfMatch

Get help with creating, editing & fixing problems with skins
User avatar
Jaime Méndez
Posts: 91
Joined: August 31st, 2022, 10:00 pm

LeftMouseUpAction within an IfMatch

Post by Jaime Méndez »

Hello!
Could someone tell me why it doesn't work. Am I missing something?

Code: Select all

[MeasureFileSize]
Measure=Plugin
Plugin=FileView
Path=#SomePath#
Index=#SomeIndex#
Type=FileSize
IfMatch=^$
IfMatchAction=[!SetOption SomeMeter LeftMouseUpAction "SomeAction"]
IfNotMatchAction=[!SetOption SomeMeter LeftMouseUpAction "SomeOtherActioon"]
Last edited by Jaime Méndez on November 11th, 2022, 9:45 pm, edited 1 time in total.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2175
Joined: March 23rd, 2015, 5:26 pm

Re: LeftMouseUpAction within an IfMatch

Post by SilverAzide »

Jaime Méndez wrote: November 11th, 2022, 8:38 pm
Could it be this: Path=#SomePath]# ?
Gadgets Wiki GitHub More Gadgets...
User avatar
Jaime Méndez
Posts: 91
Joined: August 31st, 2022, 10:00 pm

Re: LeftMouseUpAction within an IfMatch

Post by Jaime Méndez »

Thank you for answer. No, it was a bad writing, sorry
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4884
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: LeftMouseUpAction within an IfMatch

Post by eclectic-tech »

It is a good practice, If your "SomeAction" contains spaces, or quote marks, to use magic quotes: """SomeAction""".

When using !SetOption, it is a good practice, if your "SomeAction" contains variables or measures, to 'escape' them: #*Variablename*# or [*Measurename*].

That way the action will use the dynamic value, not the current one; 'escaping' keeps the variable or measure dynamic.
User avatar
balala
Rainmeter Sage
Posts: 14758
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: LeftMouseUpAction within an IfMatch

Post by balala »

Jaime Méndez wrote: November 11th, 2022, 8:38 pm Could someone tell me why it doesn't work. Am I missing something?
What "doesn't work" does mean? Is working the measure? Does it return a value? Or the measure is working, just don't you get the appropriate LeftMouseUpAction option on the meter? Sorry, but I'm not sure.
User avatar
Jaime Méndez
Posts: 91
Joined: August 31st, 2022, 10:00 pm

Re: LeftMouseUpAction within an IfMatch

Post by Jaime Méndez »

balala wrote: November 12th, 2022, 10:43 am What "doesn't work" does mean? Is working the measure? Does it return a value? Or the measure is working, just don't you get the appropriate LeftMouseUpAction option on the meter? Sorry, but I'm not sure.
It won't do anything when I LefMouseUpAction.

I did this and it still doesn't work properly, but i see that it tries to do something know with those extra quotation marks and the change from [!SetVariable Path "[mPath]" "ExploreEXpand"] to [!SetVariable Path "#*Path*#[*mPath*]\" "ExploreEXpand"]

Code: Select all

;IfMatchAction=[!SetOption MeterTileSelection%% LeftMouseUpAction """[!CommandMeasure "*MeasureFilePath%%*" "FollowPath"][!SetVariable Path "#*Path*#[*mPath*]\" "ExploreEXpand"][!UpdateMeasure mPath "ExploreEXpand"][!CommandMeasure "*ScriptFactoryTiles*" "Run((#*Amount*#-1))"][!CommandMeasure "*ScriptRefresher*" "Run()"][*!Refresh*]"""]

; I just want this click action to operate within a IfMatch condition:
LeftMouseUpAction=[!CommandMeasure "MeasureFilePath%%" "FollowPath"][!SetVariable Path "[mPath]" "ExploreEXpand"][!UpdateMeasure mPath "ExploreEXpand"][!CommandMeasure "ScriptFactoryTiles" "Run((#Amount#-1))"][!CommandMeasure "ScriptRefresher" "Run()"][!Refresh]
User avatar
balala
Rainmeter Sage
Posts: 14758
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: LeftMouseUpAction within an IfMatch

Post by balala »

Jaime Méndez wrote: November 12th, 2022, 7:45 pm It won't do anything when I LefMouseUpAction.
I suppose this should be related to the last-posted EXpandExplore package. But at least in the posted package such an IfMatch option doesn't exist (or I couldn't find it at least). So, in which file the measure(s) we're talking about, with those IfMatch options do exist?
User avatar
Jaime Méndez
Posts: 91
Joined: August 31st, 2022, 10:00 pm

Re: LeftMouseUpAction within an IfMatch

Post by Jaime Méndez »

balala wrote: November 12th, 2022, 9:25 pm I suppose this should be related to the last-posted EXpandExplore package. But at least in the posted package such an IfMatch option doesn't exist (or I couldn't find it at least). So, in which file the measure(s) we're talking about, with those IfMatch options do exist?
It is new in code. I am tiring to implement an IfMatchAction in a new Measure [MeasureFileSize]
In tiles.inc.template:

Code: Select all

[MeasureFileSize]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Index=%%
Type=FileSize
IfMatch=^$
;IfMatchAction=[!SetOption MeterTileSelection%% LeftMouseUpAction """[!CommandMeasure "*MeasureFilePath%%*" "FollowPath"][!SetVariable Path "#*Path*#[*mPath*]\" "ExploreEXpand"][!UpdateMeasure mPath "ExploreEXpand"][!CommandMeasure "*ScriptFactoryTiles*" "Run((#*Amount*#-1))"][!CommandMeasure "*ScriptRefresher*" "Run()"][*!Refresh*]"""]
;IfNotMatchAction=[!SetOption MeterTileSelection%% LeftMouseUpAction """[!CommandMeasure "*MeasureFilePath%%*" "FollowPath"][!SetVariable Path "#*Path*#[*mPath*]\" "ExploreEXpand"][!UpdateMeasure mPath "ExploreEXpand"][!CommandMeasure "*ScriptFactoryTiles*" "Run((#*Amount*#-1))"][!CommandMeasure "*ScriptRefresher*" "Run()"]"""]

[MeterTileSelection%%]
Meter=Shape
Shape=Rectangle (#TILE_%%_X#+(#Tile_Width#-#Tiles_Selection_Width#)/2),#TILE_%%_Y#,(#Tiles_Selection_Width#),(#Tiles_Text_OY#+[MeterTileText%%:H]-(#FontSize#/1.5)) | Fill Color #Hover_Selection_Color#,(#Hover_Selection_Opacity#*#TILE_%%_SELECTION#*[MeasureTimerCalc:]) | Stroke Color #Hover_Selection_Color#, (#Hover_Selection_Border_Opacity#*#TILE_%%_SELECTION#*[MeasureTimerCalc:])
DynamicVariables=1
Group=SelectionGroup
MouseOverAction=[!SetVariable TILE_%%_SELECTION 1][!UpdateMeter "MeterTileSelection%%"][!Redraw]
MouseLeaveAction=[!SetVariable TILE_%%_SELECTION 0][!UpdateMeter "MeterTileSelection%%"][!Redraw]
MiddleMouseUpAction=["[MeasureFilePath%%]"]
LeftMouseUpAction=[!CommandMeasure "MeasureFilePath%%" "FollowPath"][!SetVariable Path "[mPath]" "ExploreEXpand"][!UpdateMeasure mPath "ExploreEXpand"][!CommandMeasure "ScriptFactoryTiles" "Run((#Amount#-1))"][!CommandMeasure "ScriptRefresher" "Run()"][!Refresh]
RightMouseUpAction=[!CommandMeasure MeasureFilePath%% "ContextMenu"]
Group=Main