If you use this skin:
Code: Select all
[Rainmeter]
Update=5000
OnRefreshAction=[!SetOption MeterOne Text "After OnRefresh"][!Log "Just Refreshed"]
[MeterOne]
Meter=String
FontSize=11
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Before OnRefresh
Why? Because the !SetOption happens after the meter is updated and the skin is "drawn" on the screen during the first update. The meter will be updated and the skin drawn again (reflected the changed value) during the second update cycle.
If you use this skin:
Code: Select all
[Rainmeter]
Update=5000
OnRefreshAction=[!SetOption MeterOne Text "After OnRefresh"][!Log "Just Refreshed"][!UpdateMeter *][!Redraw]
[MeterOne]
Meter=String
FontSize=11
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Before OnRefresh
Why? Because all the above is still true, but you are forcing an extra update to the meter and an extra redraw of the skin at the end of the first update cycle, before it starts waiting Update=5000 (5 seconds) for the next cycle.
As I said, the long and the short of it is that when a skin is loaded or refreshed it does:
Update measures
Update meters
Draw skin
Execute OnRefreshAction
followed by an endless loop of:
Wait Update millisconds
Update measures
Update meters
Draw skin
Nothing more, nothing less...
I think the key to this is already pretty clear in the documentation. OnRefreshAction happens LAST in the first update cycle when a skin is first loaded or refreshed, and the fact that it is near the top of the skin has nothing whatever to do with when it is run. It is the very last thing the skin does before it starts waiting Update milliseconds for the next update cycle. I do think the fact that it happens even after the skin is "drawn" at the end of the first update cycle could be more clear. I will look into making a change to that.