Thank you balalabalala 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).
It is currently March 28th, 2024, 4:57 pm
IfMatch doesn't work...
Re: IfMatch doesn't work...
Re: IfMatch doesn't work...
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.
- balala
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: IfMatch doesn't work...
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...
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
- balala
- Rainmeter Sage
- Posts: 16110
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: IfMatch doesn't work...
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...
You're right but the LastOne variable formula was different. [#*LastOne*]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?