It is currently March 28th, 2024, 4:57 pm

IfMatch doesn't work...

Get help with creating, editing & fixing problems with skins
User avatar
tass_co
Posts: 511
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: IfMatch doesn't work...

Post 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:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: IfMatch doesn't work...

Post by balala »

tass_co wrote: April 16th, 2022, 8:28 pm Thank you balala :thumbup:
Did work?
User avatar
tass_co
Posts: 511
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: IfMatch doesn't work...

Post 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:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: IfMatch doesn't work...

Post 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.
User avatar
tass_co
Posts: 511
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: IfMatch doesn't work...

Post 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.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: IfMatch doesn't work...

Post 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.
User avatar
tass_co
Posts: 511
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: IfMatch doesn't work...

Post 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:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: IfMatch doesn't work...

Post 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.
User avatar
tass_co
Posts: 511
Joined: May 4th, 2020, 3:01 pm
Location: Ankara, TURKEY

Re: IfMatch doesn't work...

Post 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*]
Post Reply