It is currently March 28th, 2024, 7:35 pm

IfMatch with variables not working

Get help with creating, editing & fixing problems with skins
Bence
Posts: 4
Joined: September 12th, 2019, 4:17 pm

IfMatch with variables not working

Post by Bence »

Hi,
I'm trying to use IfMatch in my MeasureDate, but it's not working. It seems not compare the value of the variable (the variable value is a string, a date like September 12, 2019) with the date of the Measure. I want to count when the program (explorer) is running, store the date in the variables EDate1,2,3...,7 and store the running time in the variables Count1,2,3....,7. The MeasureDate set 0 to Dif variable, i don't know why, because it means the values of the variables are not equal with the date. But in this case EDate1 will be equal to the current date (IfCondition8), so it should match right? Plus, interesting that IfCondition8 write the current date to EDate1, but not change the other EDate values...

Thanks every help ;-)

Code: Select all

[Rainmeter]
Update=1000
SolidColor=0,0,0,255

[Variables]

DateNow=[MeasureDate]

@includeStyles=#@#Styles.inc

@includeVariables=#@#Variables.inc


;-------------------------------------------
; MAIN APPEARANCE
;-------------------------------------------


[RuningInvisibleBackground]
Meter=String
W=([Launcher1Text:W] + (0 - ((#Launcher1IconHidden# - 1) * 40))) + 20
H=40
SolidColor=0,0,0,1

[MeasureProcess]
Measure=Plugin
Plugin=Process
ProcessName=explorer.exe

[MeasureProcess2]
Measure=Plugin
Plugin=Process
ProcessName=explorer.exe
Substitute="-1":"not running","1":"is running"

[MeterProcess]
Meter=String
MeasureName=MeasureProcess2
MeterStyle=FontStyleVegurLight
X=200
Y=20
Text=#Launcher1Text# %1
StringAlign=CenterCenter
FontSize=20

[MeterProcess2]
Meter=String
MeterStyle=FontStyleVegurLight
X=200
Y=50
Text=#Counter# mp - #DateNow#
StringAlign=CenterCenter
FontSize=20

[MeasureDate]
Measure=Time
Format=%B %#d, %Y
IfMatch=#EDate1#
IfMatchAction=[!WriteKeyValue Variables Dif 1 "#@#Variables.inc"]
IfMatch2=#EDate2#
IfMatchAction2=[!WriteKeyValue Variables Dif 2 "#@#Variables.inc"]
IfMatch3=#EDate3#
IfMatchAction3=[!WriteKeyValue Variables Dif 3 "#@#Variables.inc"]
IfMatch4=#EDate4#
IfMatchAction4=[!WriteKeyValue Variables Dif 4 "#@#Variables.inc"]
IfMatch5=#EDate5#
IfMatchAction5=[!WriteKeyValue Variables Dif 5 "#@#Variables.inc"]
IfMatch6=#EDate6#
IfMatchAction6=[!WriteKeyValue Variables Dif 6 "#@#Variables.inc"]
IfMatch7=#EDate7#
IfMatchAction7=[!WriteKeyValue Variables Dif 7 "#@#Variables.inc"]
IfMatch8=#EDate1# | #EDate2# | #EDate3# | #EDate4# | #EDate5# | #EDate6# | #EDate7#
IfNotMatchAction8=[!WriteKeyValue Variables Dif 0 "#@#Variables.inc"]
IfMatchMode=1

[MeasurePort]
Measure=Calc
Formula=#Counter#
IfCondition=(MeasureProcess = 1) && (#Dif# = 1)
IfTrueAction=!execute [!WriteKeyValue Variables Counter1 (#Counter1#+1) "#@#Variables.inc"][!WriteKeyValue Variables EDate1 [MeasureDate] "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
IfCondition2=(MeasureProcess = 1) && (#Dif# = 2)
IfTrueAction2=!execute [!WriteKeyValue Variables Counter2 (#Counter2#+1) "#@#Variables.inc"][!WriteKeyValue Variables EDate2 [MeasureDate] "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
IfCondition3=(MeasureProcess = 1) && (#Dif# = 3)
IfTrueAction3=!execute [!WriteKeyValue Variables Counter3 (#Counter3#+1) "#@#Variables.inc"][!WriteKeyValue Variables EDate3 [MeasureDate] "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
IfCondition4=(MeasureProcess = 1) && (#Dif# = 4)
IfTrueAction4=!execute [!WriteKeyValue Variables Counter4 (#Counter4#+1) "#@#Variables.inc"][!WriteKeyValue Variables EDate4 [MeasureDate] "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
IfCondition5=(MeasureProcess = 1) && (#Dif# = 5)
IfTrueAction5=!execute [!WriteKeyValue Variables Counter5 (#Counter5#+1) "#@#Variables.inc"][!WriteKeyValue Variables EDate5 [MeasureDate] "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
IfCondition6=(MeasureProcess = 1) && (#Dif# = 6)
IfTrueAction6=!execute [!WriteKeyValue Variables Counter6 (#Counter6#+1) "#@#Variables.inc"][!WriteKeyValue Variables EDate6 [MeasureDate] "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
IfCondition7=(MeasureProcess = 1) && (#Dif# = 7)
IfTrueAction7=!execute [!WriteKeyValue Variables Counter7 (#Counter7#+1) "#@#Variables.inc"][!WriteKeyValue Variables EDate7 [MeasureDate] "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
IfCondition8=(MeasureProcess = 1) && (#Dif# = 0)
IfTrueAction8=!execute [!WriteKeyValue Variables EDate7 #EDate6# "#@#Variables.inc"][!WriteKeyValue Variables EDate6 #EDate5# "#@#Variables.inc"][!WriteKeyValue Variables EDate5 #EDate4# "#@#Variables.inc"][!WriteKeyValue Variables EDate4 #EDate3# "#@#Variables.inc"][!WriteKeyValue Variables EDate3 #EDate2# "#@#Variables.inc"][!WriteKeyValue Variables EDate2 #EDate1# "#@#Variables.inc"][!WriteKeyValue Variables EDate1 [MeasureDate] "#@#Variables.inc"][!Refresh]
DynamicVariables=1

Code: Select all

[Variables]

;-------------------------------------------
; VARIABLES
;-------------------------------------------

MainColour=255,255,255
SecondaryColour=255,255,255
TertiaryColour=0,0,0
QuaternaryColour=255,255,255
QuinaryColour=255,255,255

Analogue=ue
Colour=u

;---------------------------------------------
; LAUNCHERS
;---------------------------------------------
Dif=0
Counter=0
Counter1=0
EDate1=September 12, 2019
Counter2=0
EDate2=September 7, 2019
Counter3=0
EDate3=September 6, 2019
Counter4=0
EDate4=September 5, 2019
Counter5=0
EDate5=September 4, 2019
Counter6=0
EDate6=September 3, 2019
Counter7=0
EDate7=September 2, 2019

Launcher1Text=Explorer
Launcher1Path=explorer.exe
Launcher1IconHidden=0
Launcher1IconPath=D:\Download\explorer.png

User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: IfMatch with variables not working

Post by balala »

Bence wrote: September 12th, 2019, 5:45 pm I'm trying to use IfMatch in my MeasureDate, but it's not working. It seems not compare the value of the variable (the variable value is a string, a date like September 12, 2019) with the date of the Measure. I want to count when the program (explorer) is running, store the date in the variables EDate1,2,3...,7 and store the running time in the variables Count1,2,3....,7. The MeasureDate set 0 to Dif variable, i don't know why, because it means the values of the variables are not equal with the date. But in this case EDate1 will be equal to the current date (IfCondition8), so it should match right?
There is a problem with the IfMatch8 option. You should remove the spaces between variables. I mean that instead of IfMatch8=#EDate1# | #EDate2# | #EDate3# | #EDate4# | #EDate5# | #EDate6# | #EDate7#, try the following form of this option: IfMatch8=#EDate1#|#EDate2#|#EDate3#|#EDate4#|#EDate5#|#EDate6#|#EDate7# (with no spaces).
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: IfMatch with variables not working

Post by balala »

And two more details:
  • Take care that when using the !WriteKeyValue bang, the new value of the variable is written physically to the file, but the skin won't use this new value, unless you're adding !SetVariable bangs beside the !WriteKeyValue bangs (or refreshing the skin, but this is much more then undesirable, because). For instance in the IfMatchActionX options of the [MeasureDate] measure you1re writing the new values for the Dif variable into the Variables.inc file, but the [MeasurePort] measure can't use these new values. To let it to use them, add, as said the following !SetVariable bangs:

    Code: Select all

    [MeasureDate]
    Measure=Time
    Format=%B %#d, %Y
    IfMatch=#EDate1#
    IfMatchAction=[!WriteKeyValue Variables Dif "1" "#@#Variables.inc"][!SetVariable Dif "1"][!UpdateMeasure "MeasurePort"]
    IfMatch2=#EDate2#
    IfMatchAction2=[!WriteKeyValue Variables Dif "2" "#@#Variables.inc"][!SetVariable Dif "2"][!UpdateMeasure "MeasurePort"]
    IfMatch3=#EDate3#
    IfMatchAction3=[!WriteKeyValue Variables Dif "3" "#@#Variables.inc"][!SetVariable Dif "3"][!UpdateMeasure "MeasurePort"]
    IfMatch4=#EDate4#
    IfMatchAction4=[!WriteKeyValue Variables Dif "4" "#@#Variables.inc"][!SetVariable Dif "4"][!UpdateMeasure "MeasurePort"]
    IfMatch5=#EDate5#
    IfMatchAction5=[!WriteKeyValue Variables Dif "5" "#@#Variables.inc"][!SetVariable Dif "5"][!UpdateMeasure "MeasurePort"]
    IfMatch6=#EDate6#
    IfMatchAction6=[!WriteKeyValue Variables Dif "6" "#@#Variables.inc"][!SetVariable Dif "6"][!UpdateMeasure "MeasurePort"]
    IfMatch7=#EDate7#
    IfMatchAction7=[!WriteKeyValue Variables Dif "7" "#@#Variables.inc"][!SetVariable Dif "7"][!UpdateMeasure "MeasurePort"]
    IfMatch8=#EDate1#|#EDate2#|#EDate3#|#EDate4#|#EDate5#|#EDate6#|#EDate7#
    IfNotMatchAction8=[!WriteKeyValue Variables Dif "0" "#@#Variables.inc"][!SetVariable Dif "0"][!UpdateMeasure "MeasurePort"]
    IfMatchMode=1
    Note here that I think the IfMatchMode isn't required to be set to 1.
  • Get used to quote every value you want to write through a !WriteKeyValue / set through a !SetVariable bang (also applied on the !WriteKEyValue bangs above). If those values don't contain spaces, the writing / setting will work even if the values are not quoted, but if they do have spaces, the whole process won't work properly, because if not quoted, Rainmeter think the value which has to be written / set is up to the first space and it won't write / set the whole value which would have to be. Doesn't hurt to get used to use the quotation marks EVERY TIME you want to write / set a new value for a variable. That's why I added the needed quotations into the bangs of used into the IfTrueAction options of the [MeasurePort] measure:

    Code: Select all

    [MeasurePort]
    Measure=Calc
    Formula=#Counter#
    IfCondition=(MeasureProcess = 1) && (#Dif# = 1)
    IfTrueAction=!execute [!WriteKeyValue Variables Counter1 "(#Counter1#+1)" "#@#Variables.inc"][!WriteKeyValue Variables EDate1 "[MeasureDate]" "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
    IfCondition2=(MeasureProcess = 1) && (#Dif# = 2)
    IfTrueAction2=!execute [!WriteKeyValue Variables Counter2 "(#Counter2#+1)" "#@#Variables.inc"][!WriteKeyValue Variables EDate2 "[MeasureDate]" "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
    IfCondition3=(MeasureProcess = 1) && (#Dif# = 3)
    IfTrueAction3=!execute [!WriteKeyValue Variables Counter3 "(#Counter3#+1)" "#@#Variables.inc"][!WriteKeyValue Variables EDate3 "[MeasureDate]" "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
    IfCondition4=(MeasureProcess = 1) && (#Dif# = 4)
    IfTrueAction4=!execute [!WriteKeyValue Variables Counter4 "(#Counter4#+1)" "#@#Variables.inc"][!WriteKeyValue Variables EDate4 "[MeasureDate]" "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
    IfCondition5=(MeasureProcess = 1) && (#Dif# = 5)
    IfTrueAction5=!execute [!WriteKeyValue Variables Counter5 "(#Counter5#+1)" "#@#Variables.inc"][!WriteKeyValue Variables EDate5 "[MeasureDate]" "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
    IfCondition6=(MeasureProcess = 1) && (#Dif# = 6)
    IfTrueAction6=!execute [!WriteKeyValue Variables Counter6 "(#Counter6#+1)" "#@#Variables.inc"][!WriteKeyValue Variables EDate6 "[MeasureDate]" "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
    IfCondition7=(MeasureProcess = 1) && (#Dif# = 7)
    IfTrueAction7=!execute [!WriteKeyValue Variables Counter7 "(#Counter7#+1)" "#@#Variables.inc"][!WriteKeyValue Variables EDate7 "[MeasureDate]" "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
    IfCondition8=(MeasureProcess = 1) && (#Dif# = 0)
    IfTrueAction8=!execute [!WriteKeyValue Variables EDate7 "#EDate6#" "#@#Variables.inc"][!WriteKeyValue Variables EDate6 "#EDate5#" "#@#Variables.inc"][!WriteKeyValue Variables EDate5 "#EDate4#" "#@#Variables.inc"][!WriteKeyValue Variables EDate4 "#EDate3#" "#@#Variables.inc"][!WriteKeyValue Variables EDate3 "#EDate2#" "#@#Variables.inc"][!WriteKeyValue Variables EDate2 "#EDate1#" "#@#Variables.inc"][!WriteKeyValue Variables EDate1 "[MeasureDate]" "#@#Variables.inc"][!Refresh]
    DynamicVariables=1
    This especially important when you want to write the values of the EDateX variables, because they always have spaces, being dates. Some details: https://forum.rainmeter.net/viewtopic.php?f=5&t=26350&p=137628&hilit=quote+enclose+option#p137628.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: IfMatch with variables not working

Post by jsmorley »

There is a problem with the IfMatch8 option. You should remove the spaces between variables. I mean that instead of IfMatch8=#EDate1# | #EDate2# | #EDate3# | #EDate4# | #EDate5# | #EDate6# | #EDate7#, try the following form of this option: IfMatch8=#EDate1#|#EDate2#|#EDate3#|#EDate4#|#EDate5#|#EDate6#|#EDate7# (with no spaces).
Right. It's important to remember that IfMatch is just a regular expression. Nothing more, nothing less. If the regular expression is matched, exactly as expressed, it's true. If not, it's false.

While Rainmeter is generally very forgiving of unneeded white space or mismatched capitalization and other things like that, regular expression is famously NOT forgiving of any such. With regular expression, you must say exactly what you mean. That is because everything means something. Regular expression is by design extremely terse and tight. Not one single character is irrelevant. Nothing is ignored. Nothing is forgiven.
Bence
Posts: 4
Joined: September 12th, 2019, 4:17 pm

Re: IfMatch with variables not working

Post by Bence »

jsmorley wrote: September 12th, 2019, 7:52 pm Right. It's important to remember that IfMatch is just a regular expression. Nothing more, nothing less. If the regular expression is matched, exactly as expressed, it's true. If not, it's false.

While Rainmeter is generally very forgiving of unneeded white space or mismatched capitalization and other things like that, regular expression is famously NOT forgiving of any such. With regular expression, you must say exactly what you mean. That is because everything means something. Regular expression is by design extremely terse and tight. Not one single character is irrelevant. Nothing is ignored. Nothing is forgiven.
Thank you for your help :)
Bence
Posts: 4
Joined: September 12th, 2019, 4:17 pm

Re: IfMatch with variables not working

Post by Bence »

balala wrote: September 12th, 2019, 7:51 pm And two more details:
  • Take care that when using the !WriteKeyValue bang, the new value of the variable is written physically to the file, but the skin won't use this new value, unless you're adding !SetVariable bangs beside the !WriteKeyValue bangs (or refreshing the skin, but this is much more then undesirable, because). For instance in the IfMatchActionX options of the [MeasureDate] measure you1re writing the new values for the Dif variable into the Variables.inc file, but the [MeasurePort] measure can't use these new values. To let it to use them, add, as said the following !SetVariable bangs:

    Code: Select all

    [MeasureDate]
    Measure=Time
    Format=%B %#d, %Y
    IfMatch=#EDate1#
    IfMatchAction=[!WriteKeyValue Variables Dif "1" "#@#Variables.inc"][!SetVariable Dif "1"][!UpdateMeasure "MeasurePort"]
    IfMatch2=#EDate2#
    IfMatchAction2=[!WriteKeyValue Variables Dif "2" "#@#Variables.inc"][!SetVariable Dif "2"][!UpdateMeasure "MeasurePort"]
    IfMatch3=#EDate3#
    IfMatchAction3=[!WriteKeyValue Variables Dif "3" "#@#Variables.inc"][!SetVariable Dif "3"][!UpdateMeasure "MeasurePort"]
    IfMatch4=#EDate4#
    IfMatchAction4=[!WriteKeyValue Variables Dif "4" "#@#Variables.inc"][!SetVariable Dif "4"][!UpdateMeasure "MeasurePort"]
    IfMatch5=#EDate5#
    IfMatchAction5=[!WriteKeyValue Variables Dif "5" "#@#Variables.inc"][!SetVariable Dif "5"][!UpdateMeasure "MeasurePort"]
    IfMatch6=#EDate6#
    IfMatchAction6=[!WriteKeyValue Variables Dif "6" "#@#Variables.inc"][!SetVariable Dif "6"][!UpdateMeasure "MeasurePort"]
    IfMatch7=#EDate7#
    IfMatchAction7=[!WriteKeyValue Variables Dif "7" "#@#Variables.inc"][!SetVariable Dif "7"][!UpdateMeasure "MeasurePort"]
    IfMatch8=#EDate1#|#EDate2#|#EDate3#|#EDate4#|#EDate5#|#EDate6#|#EDate7#
    IfNotMatchAction8=[!WriteKeyValue Variables Dif "0" "#@#Variables.inc"][!SetVariable Dif "0"][!UpdateMeasure "MeasurePort"]
    IfMatchMode=1
    Note here that I think the IfMatchMode isn't required to be set to 1.
  • Get used to quote every value you want to write through a !WriteKeyValue / set through a !SetVariable bang (also applied on the !WriteKEyValue bangs above). If those values don't contain spaces, the writing / setting will work even if the values are not quoted, but if they do have spaces, the whole process won't work properly, because if not quoted, Rainmeter think the value which has to be written / set is up to the first space and it won't write / set the whole value which would have to be. Doesn't hurt to get used to use the quotation marks EVERY TIME you want to write / set a new value for a variable. That's why I added the needed quotations into the bangs of used into the IfTrueAction options of the [MeasurePort] measure:

    Code: Select all

    [MeasurePort]
    Measure=Calc
    Formula=#Counter#
    IfCondition=(MeasureProcess = 1) && (#Dif# = 1)
    IfTrueAction=!execute [!WriteKeyValue Variables Counter1 "(#Counter1#+1)" "#@#Variables.inc"][!WriteKeyValue Variables EDate1 "[MeasureDate]" "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
    IfCondition2=(MeasureProcess = 1) && (#Dif# = 2)
    IfTrueAction2=!execute [!WriteKeyValue Variables Counter2 "(#Counter2#+1)" "#@#Variables.inc"][!WriteKeyValue Variables EDate2 "[MeasureDate]" "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
    IfCondition3=(MeasureProcess = 1) && (#Dif# = 3)
    IfTrueAction3=!execute [!WriteKeyValue Variables Counter3 "(#Counter3#+1)" "#@#Variables.inc"][!WriteKeyValue Variables EDate3 "[MeasureDate]" "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
    IfCondition4=(MeasureProcess = 1) && (#Dif# = 4)
    IfTrueAction4=!execute [!WriteKeyValue Variables Counter4 "(#Counter4#+1)" "#@#Variables.inc"][!WriteKeyValue Variables EDate4 "[MeasureDate]" "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
    IfCondition5=(MeasureProcess = 1) && (#Dif# = 5)
    IfTrueAction5=!execute [!WriteKeyValue Variables Counter5 "(#Counter5#+1)" "#@#Variables.inc"][!WriteKeyValue Variables EDate5 "[MeasureDate]" "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
    IfCondition6=(MeasureProcess = 1) && (#Dif# = 6)
    IfTrueAction6=!execute [!WriteKeyValue Variables Counter6 "(#Counter6#+1)" "#@#Variables.inc"][!WriteKeyValue Variables EDate6 "[MeasureDate]" "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
    IfCondition7=(MeasureProcess = 1) && (#Dif# = 7)
    IfTrueAction7=!execute [!WriteKeyValue Variables Counter7 "(#Counter7#+1)" "#@#Variables.inc"][!WriteKeyValue Variables EDate7 "[MeasureDate]" "#@#Variables.inc"][!WriteKeyValue Variables Counter (#Counter1#+#Counter2#+#Counter3#+#Counter4#+#Counter5#+#Counter6#+#Counter7#) "#@#Variables.inc"][!Refresh]
    IfCondition8=(MeasureProcess = 1) && (#Dif# = 0)
    IfTrueAction8=!execute [!WriteKeyValue Variables EDate7 "#EDate6#" "#@#Variables.inc"][!WriteKeyValue Variables EDate6 "#EDate5#" "#@#Variables.inc"][!WriteKeyValue Variables EDate5 "#EDate4#" "#@#Variables.inc"][!WriteKeyValue Variables EDate4 "#EDate3#" "#@#Variables.inc"][!WriteKeyValue Variables EDate3 "#EDate2#" "#@#Variables.inc"][!WriteKeyValue Variables EDate2 "#EDate1#" "#@#Variables.inc"][!WriteKeyValue Variables EDate1 "[MeasureDate]" "#@#Variables.inc"][!Refresh]
    DynamicVariables=1
    This especially important when you want to write the values of the EDateX variables, because they always have spaces, being dates. Some details: https://forum.rainmeter.net/viewtopic.php?f=5&t=26350&p=137628&hilit=quote+enclose+option#p137628.
Thank you for your time, thank you very much :)
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: IfMatch with variables not working

Post by balala »

Bence wrote: September 13th, 2019, 9:50 am Thank you for your time, thank you very much :)
Have you got it working well?
Bence
Posts: 4
Joined: September 12th, 2019, 4:17 pm

Re: IfMatch with variables not working

Post by Bence »

balala wrote: September 13th, 2019, 3:22 pm Have you got it working well?
Yes, It works fine.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: IfMatch with variables not working

Post by balala »

Bence wrote: September 15th, 2019, 6:48 pm Yes, It works fine.
:thumbup: