Code: Select all
[Rainmeter]
DynamicWindowSize=1
BackGroundMode=2
SolidColor=0,0,0,1
[Variables]
ShowIt=0
Hide=1
;-----------------
[CHide]
Measure=Calc
Formula=((#Hide#+1) > 1) ? 0 : #Hide#+1
DynamicVariables=1
[ShowIt-Check]
Measure=Calc
Formula=#ShowIt# = 1 ? 1 : 0
IfEqualValue=1
IfEqualAction=!Execute [!RainmeterShowMeter String2]
[SHide]
Measure=Calc
Formula=#Hide# = 1 ? 0 : 1
DynamicVariables=1
IfEqualValue=1
IfEqualAction=!Execute [!RainmeterHideMeter String2]
[AHide]
Measure=Calc
Formula=#Hide# = 1 ? 1 : 0
DynamicVariables=1
[ShowItA-Check]
Measure=Calc
Formula=#ShowIt# = 1 ? 0 : 1
IfEqualValue=1
IfEqualAction=!Execute [!RainmeterHideMeter String4]
;---
[Button]
Meter=String
StringStyle=Bold
FontColor=255,255,255
Text="Button"
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Variables Hide [CHide]][!RainmeterRefresh]
[String1]
Meter=String
FontColor=255,255,255
Text="String1"
X=2
Y=R
Hidden=[SHide]
DynamicVariables=1
[String2]
Meter=String
FontColor=255,255,255
Text="String2"
X=2
Y=R
DynamicVariables=1
Hidden=1
[String3]
Meter=String
FontColor=255,255,255
Text="String3"
X=2
Y=R
DynamicVariables=1
Hidden=[AHide]
[String4]
Meter=String
FontColor=255,255,255
Text="String4"
X=2
Y=R
DynamicVariables=1
Hidden=[AHide]
So. What we are after are the meters String2 and String4.
These two depend on the variable ShowIt. If it's 1, they should show. If it's 0, they should hide.
String2 have no problems what so ever with this. String4 has some problems with it though.
String4 is with String3, they are hidden at start, but if we click on 'Button' they are shown because the dynamic variable for Hidden says so.
But, when ShowIt=0 String4 should remain hidden. It does not.
Explaining more in depth is a bit tricky for me, so I advice to take a look at the code and try it out.
It's not a matter of order for I think I have tried every possible combination of how the calcs can be placed.
So I'm thinking that there might some sort of overflow that makes the skin ignore the last !Bang that should outrule any other value. At least that's what makes the most sense. The skins are still being read from top to bottom, right?
Now I'm betting alex or some other guru is going to tell me how wrong I am. But we'll see...