I not sure why this happens but I'm guessing either the bangs are performed twice (first when the line is read and secondly when the first update cycle is complete). Or anything changed by OnRefreshAction is "locked" from any changes until the first update cycle is complete.
The manual does talk about actions taking place at the end of the first cycle:
But to me it doesn't really explain that even if the changes are made immediate using !UpdateMeter/Measure/!Redraw you can't change them again until after the first update cycle if complete.Note: The action(s) defined will take place at the very end of the first update cycle. Changes made will generally not be visible until the next update, unless bangs are used to update desired measures and meters and redraw the skin.
It could just be me but I found this confusing. If anyone else thinks the same perhaps it would help to clarify the documentation a bit.
If you want to see this behaviour here is the little test I used:
Code: Select all
[Rainmeter]
Update=1000
OnRefreshAction=[!HideMeter "test_string"][!Redraw]
[test_measure]
Measure=Calc
Formula=1
IfCondition=1=1
IfTrueAction=[!ShowMeter "test_string"]
[test_background]
meter=image
x=0
y=0
w=100
h=24
solidcolor=0,0,0,200
[test_string]
Meter=string
X=4
Y=2
text=test string
fontface=segoe ui
fontsize=10
fontcolor=200,200,200,255
AntiAlias=1