Page 2 of 2

Re: IfMatch doesn't work...

Posted: April 16th, 2022, 8:28 pm
by tass_co
balala wrote: April 16th, 2022, 3:12 pm Try adding a DecodeCharacterReference=1 option to the WebParser measure which returns the value (so in this case to the [MeaItem] measure).
Thank you balala :thumbup:

Re: IfMatch doesn't work...

Posted: April 17th, 2022, 8:01 am
by balala
tass_co wrote: April 16th, 2022, 8:28 pm Thank you balala :thumbup:
Did work?

Re: IfMatch doesn't work...

Posted: April 17th, 2022, 12:26 pm
by tass_co
balala wrote: April 17th, 2022, 8:01 amDid work?
Symbol decoding part working but IfMatch still doesnt work.
It's not a big deal, I use it in different way :thumbup:

Re: IfMatch doesn't work...

Posted: April 17th, 2022, 3:38 pm
by balala
tass_co wrote: April 17th, 2022, 12:26 pm Symbol decoding part working but IfMatch still doesnt work.
It's not a big deal, I use it in different way :thumbup:
What isn't working? Because it does here, at least as far as I can tell.

Re: IfMatch doesn't work...

Posted: April 17th, 2022, 5:26 pm
by tass_co
balala wrote: April 17th, 2022, 3:38 pm What isn't working? Because it does here, at least as far as I can tell.
IfMatch doesnt work correctly.
It either always displays the imagemeter or not at all.
Also, when I look at Rainmeter/About, it shows that the #LastOne# variable hasn't changed at all. But it actually changes.
I know because it writes to the skin ini file.

Re: IfMatch doesn't work...

Posted: April 17th, 2022, 6:50 pm
by balala
tass_co wrote: April 17th, 2022, 5:26 pm IfMatch doesnt work correctly.
It either always displays the imagemeter or not at all.
Also, when I look at Rainmeter/About, it shows that the #LastOne# variable hasn't changed at all. But it actually changes.
I know because it writes to the skin ini file.
I'm surprised, but post please the current code. Yep, I know you've posted both, the code and the packed config, but maybe in meantime you've changed something in your code and I'd like to check how is it looking now.

Re: IfMatch doesn't work...

Posted: April 17th, 2022, 8:34 pm
by tass_co
balala wrote: April 17th, 2022, 6:50 pm I'm surprised, but post please the current code. Yep, I know you've posted both, the code and the packed config, but maybe in meantime you've changed something in your code and I'd like to check how is it looking now.
Finally I solved it balala.
Problem is variable doesn't refresh itself.
I was seeing it in the About window.
I added [!Refresh] code to LeftMouseDoubleClickAction event then the problem is solved.

Code: Select all

[MtrStar]
Meter=Image
ImageName=cap.png
x=0
y=0
W=64
H=64
LeftMouseDoubleClickAction=[!SetClip "[MeaItem]"][!WriteKeyValue Variables LastOne [MeaItem]][!Refresh]
MiddleMouseUpAction=[!SetClip "#LastOne#"]
Hidden=1
DynamicVariables=1

[MeaCheck]
Measure=String
String=[MeaItem]
IfMatchMode=1
IfMatch=^#LastOne#$
IfMatchAction=[!HideMeter MtrStar][!Redraw]
IfNotMatchAction=[!ShowMeter MtrStar][!Redraw]
DynamicVariables=1
Thank you again :thumbup:

Re: IfMatch doesn't work...

Posted: April 18th, 2022, 3:17 pm
by balala
tass_co wrote: April 17th, 2022, 8:34 pm Finally I solved it balala.
Problem is variable doesn't refresh itself.
I was seeing it in the About window.
I added [!Refresh] code to LeftMouseDoubleClickAction event then the problem is solved.
A variable can't refresh itself. The skin can be refreshed, this is done by the !Refresh bang (or manually, if needed), which does a re-read of the variables as well.
When writing a variable (or any option) with a !WriteKeyValue bang, even if the variable or option is written, the skin can't use it, until a refresh of the skin is done. This bang in order to get using the newly written variable or option, always has to be used in pair with the [!Refresh] bang. But this has been done in the first of your codes, where has it disappeared in meantime?
Just an additional detail: you can avoid the need of refresh. Here you can find out how.

Re: IfMatch doesn't work...

Posted: April 18th, 2022, 3:37 pm
by tass_co
balala wrote: April 18th, 2022, 3:17 pm This bang in order to get using the newly written variable or option, always has to be used in pair with the [!Refresh] bang. But this has been done in the first of your codes, where has it disappeared in meantime?
You're right but the LastOne variable formula was different. [#*LastOne*]