It is currently April 19th, 2024, 6:27 am

How to execute an IfMatch only if a variable is in a given state?

Get help with creating, editing & fixing problems with skins
jn_meter
Posts: 136
Joined: December 27th, 2016, 12:04 pm

Re: How to execute an IfMatch only if a variable is in a given state?

Post by jn_meter »

Thanks, balala

When I wrote of 'stor[ing] any process number in a string', I meant storing a number in a variable; and I was reporting that my attempts at such storing had resulted in the number being stored as a string. However, from your post it seems that one can have variables that really are numbers. I will investigate - though I am somewhat loathe to mess with my code now, because that code does work.

'A measure name followed by a colon is a section variable and it means the numeric value of the appropriate measure. The measure name simply (surronded by brackets) is another section variable, but it means the string value of the measure. Even if in most cases these two are the same, this is not always true, like this time.' Ah. I think I see what you mean, though I'll have to think about it a bit. (I am in a rush!)

Thanks again.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to execute an IfMatch only if a variable is in a given state?

Post by balala »

jn_meter wrote: December 31st, 2020, 5:51 pm Ah. I think I see what you mean, though I'll have to think about it a bit. (I am in a rush!)
To see the difference, add the following string meter to your code:

Code: Select all

[MeterValue]
Meter=STRING
MeasureName=measure_processTop
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
FontEffectColor=0,0,0
StringEffect=Shadow
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=String:		%1#CRLF#Num:		[measure_processTop:]
DynamicVariables=1