Hi!
Please, if someone can help.
I am just about to release final skin version, but there is still one issue.
I don't find a way to have "LeftMouseUpAction" within an "IfMatchAction" statement
Here is the pise of code involved and the whole skin:
https://forum.rainmeter.net/viewtopic.php?p=211224#p211224
Thank you fellows!
It is currently March 28th, 2024, 3:29 pm
IfMatch statement
- Jaime Méndez
- Posts: 98
- Joined: August 31st, 2022, 10:00 pm
- SilverAzide
- Rainmeter Sage
- Posts: 2588
- Joined: March 23rd, 2015, 5:26 pm
- Contact:
Re: IfMatch statement
There's nothing wrong with the IfMatch. What's wrong is that your !SetOption commands in the actions are completely mangled. Your triple-quotes are unbalanced (and may be unneeded) and your usage of asterisks is not correct either. I'd suggest reviewing the docs on how to escape variables and section references.Jaime Méndez wrote: ↑November 17th, 2022, 4:11 pm Hi!
Please, if someone can help.
I am just about to release final skin version, but there is still one issue.
I don't find a way to have "LeftMouseUpAction" within an "IfMatchAction" statement
Here is the pise of code involved and the whole skin:
https://forum.rainmeter.net/viewtopic.php?p=211224#p211224
Thank you fellows!
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: IfMatch statement
In fact, only one single pair of triple-quote can be used into one bang. If there are more, the value which will be set is from the first triple-quote up to the next one. All rest is ignored. This is what I described in my last reply, posted in the appropriate topic.SilverAzide wrote: ↑November 17th, 2022, 6:39 pm Your triple-quotes are unbalanced (and may be unneeded)
- Jaime Méndez
- Posts: 98
- Joined: August 31st, 2022, 10:00 pm
Re: IfMatch statement
Ok. Now it is working, but only for the first file or folder icon (second tile in row)
"leftmouseupclick" on next tiles does nothing. I have checked "#@#include\tile.inc" file and it has been built ok. I should work
From index 1 to 19, all have been built on file
Code: Select all
IfMatch=^$
IfMatchAction=[!SetOption MeterTileSelection%% LeftMouseUpAction """[!CommandMeasure mFilePath%% "FollowPath"][!SetVariable Path "[*mPath*]"][!UpdateMeasure mPath][!CommandMeasure "ScriptFactoryTiles" "Run((#*Amount*#-1))"][!CommandMeasure "ScriptRefresher" "Run()"][!Refresh]"""]
IfNotMatchAction=[!SetOption MeterTileSelection%% LeftMouseUpAction """[!CommandMeasure mFilePath%% "FollowPath"]"""]
From index 1 to 19, all have been built on file
Code: Select all
IfMatch=^$
IfMatchAction=[!SetOption MeterTileSelection2 LeftMouseUpAction """[!CommandMeasure mFilePath2 "FollowPath"][!SetVariable Path "[*mPath*]"][!UpdateMeasure mPath][!CommandMeasure "ScriptFactoryTiles" "Run((#*Amount*#-1))"][!CommandMeasure "ScriptRefresher" "Run()"][!Refresh]"""]
IfNotMatchAction=[!SetOption MeterTileSelection2 LeftMouseUpAction """[!CommandMeasure mFilePath2 "FollowPath"]"""]
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: IfMatch statement
On which measures have you added those IfMatch options?
- Jaime Méndez
- Posts: 98
- Joined: August 31st, 2022, 10:00 pm
Re: IfMatch statement
There is a lua script that generates the "tiles.inc" using "tiles.inc.template" file in "include" folder. You don´t need to check over the lua script, you just need to see how tile.inc is rendering tiles in skin. What i see is that it should be working for all folder and file tiles
Last edited by Jaime Méndez on November 17th, 2022, 11:27 pm, edited 1 time in total.
- Jaime Méndez
- Posts: 98
- Joined: August 31st, 2022, 10:00 pm
Re: IfMatch statement
I found the error!
There was a "%%" missing in measure name in "tiles.inc.template"
Measure name should contain "%%" anywhere in its name so the whole measure section repeats any times needed until 19 to acompain meter to be set with "IfMatchAction" "!SetOption" instruction
It is working as a charm now!
Thankyou again guys! I debt you a beer
Posting it now!
There was a "%%" missing in measure name in "tiles.inc.template"
Measure name
Code: Select all
[MeasureFileSize]
Code: Select all
[MeasureFileSize%%]
Code: Select all
[MeasureFileSize%%]
Measure=Plugin
Plugin=FileView
Path=[mPath]
Index=%%
Type=FileSize
IfMatch=^$
IfMatchAction=[!SetOption MeterTileSelection%% LeftMouseUpAction """[!CommandMeasure mFilePath%% "FollowPath"][!SetVariable Path "[*mPath*]"][!UpdateMeasure mPath][!CommandMeasure "ScriptFactoryTiles" "Run((#*Amount*#-1))"][!CommandMeasure "ScriptRefresher" "Run()"][!Refresh]"""]
IfNotMatchAction=[!SetOption MeterTileSelection%% LeftMouseUpAction """[!CommandMeasure mFilePath%% "FollowPath"]"""]
Thankyou again guys! I debt you a beer
Posting it now!
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: IfMatch statement
Glad you got it working.
But what you mean by Index=%% on the [MeasureFileSize%%] measure?
- Jaime Méndez
- Posts: 98
- Joined: August 31st, 2022, 10:00 pm
Re: IfMatch statement
This text chain "%%" is present only in a template file that isn't really part of skin structure, but it is needed for a "lua" script file that generates the real final "inc" file that form part of the skin. Script substitutes "%%" for a index number "n" times, so measures and meters repeat indexed "n" times in final "inc" file.
I hope I made myself clear
I hope I made myself clear
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: IfMatch statement
Yep, you did.