Yeah, I wanted to talk about the UpdateDivider=-1 on the Counter function being the culprit, but I wasn't sure how the function like this works, as I never used it. I did however post a reply to you last night, which, for some reason, didn't get saved here, so I'll post the code again (without the explanation though), so you can have an alternative:Wim wrote: ↑March 1st, 2020, 11:30 am I found the answer
Note that the counter goes to 1 and that it has een UpdateDiver=-1. That UpdateDivider doesn't let it go beyond 1. It was added as an additional safety in the original code i copied but became an obstacle (without me realising it) in my own code when i changed the counter to 5. I completely overlooked this.
I removed the UpdateDivider and then it worked.
I still don't fully understand the reason why it worked withbut OK. It probably forcibly updated the Measure beyond the count of 1. Presumably something likeCode: Select all
[!CommandMeasure Update][!Redraw]
I spend the better part of two weeks trying to figure this outCode: Select all
OnUpdateAction=[!CommandMeasure MeasureOnLoad2 Update] [!Redraw]
The Devil is in the details
Code: Select all
[Variables]
[Rainmeter]
Update=1000
---Measures---
[MeasureCurrentNumber]
Group=SourceGroup
Measure=Calc
Formula=((MeasureCurrentNumber+1)%2)
UpdateDivider=-1
DynamicVariables=1
[MeasureLocalTime]
Group=SourceGroup
Measure=Time
FormatLocale=Local
UpdateDivider=-1
OnUpdateAction=[!WriteKeyValue Variables Number "[MeasureCurrentNumber]" "#CURRENTPATH#Test.inc"][!WriteKeyValue Variables Check "[MeasureLocalTime]" "#CURRENTPATH#Test.inc"][!EnableMeasure "MeasureWebParserReadData"][!UpdateMeasure "MeasureWebParserReadData"][!CommandMeasure MeasureWebParserReadData "Update"]
[MeasureWebParserReadData]
Disabled=1
Measure=WebParser
URL="file://#CURRENTPATH#Test.inc"
RegExp="(?siU).*\nNumber=(.*)\nCheck=(.*)\n"
CodePage=1200
UpdateRate=-1
FinishAction=[!UpdateMeasureGroup "DataGroup"][!UpdateMeter *][!Redraw]
[MeasureNumber]
Group=DataGroup
Measure=WebParser
URL=[MeasureWebParserReadData]
StringIndex=1
UpdateDivider=-1
[MeasureCheck]
Group=DataGroup
Measure=WebParser
URL=[MeasureWebParserReadData]
StringIndex=2
UpdateDivider=-1
---Meters---
[MeterAll]
Meter=STRING
FontFace=Consolas
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
FontSize=16
AntiAlias=1
MeasureName=MeasureCurrentNumber
MeasureName2=MeasureNumber
MeasureName3=MeasureLocalTime
MeasureName4=MeasureCheck
Text="Number = written %1, read %2#CRLF#L.Time = written %3, read %4"
LeftMouseUpAction=[!UpdateMeasureGroup "SourceGroup"]