It is currently May 18th, 2024, 12:18 pm

IF Action

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22633
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: IF Action

Post by jsmorley »

Here is another approach, that would allow for extending it to more than two "sets" of icons.

Code: Select all

[Rainmeter]
Update=500
DynamicWindowSize=1

[Variables]
Group1State=1
Group2State=0

[MeasureGroup1State]
Measure=Calc
Formula=#Group1State#
DynamicVariables=1
IfEqualValue=1
IfEqualAction=!Execute [!ShowMeterGroup Group1][!HideMeterGroup Group2]
IfBelowValue=1
IfBelowAction=!Execute [!ShowMeterGroup Group2][!HideMeterGroup Group1]

[MeasureGroup2State]
Measure=Calc
Formula=#Group2State#
DynamicVariables=1
IfEqualValue=1
IfEqualAction=!Execute [!ShowMeterGroup Group2][!HideMeterGroup Group1]
IfBelowValue=1
IfBelowAction=!Execute [!ShowMeterGroup Group1][!HideMeterGroup Group2]

[App1]
Group=Group1
Meter=Image
ImageName=Images\App1.png
W=64
H=64
X=60
Y=30
LeftMouseUpAction=!Execute ["C:\Program Files\Apps\App1.exe"]

[App2]
Group=Group1
Meter=Image
ImageName=Images\App2.png
W=64
H=64
X=80
Y=80
LeftMouseUpAction=!Execute ["C:\Program Files\Apps\App2.exe"]

[App3]
Group=Group2
Meter=Image
ImageName=Images\App3.png
W=64
H=64
X=60
Y=30
LeftMouseUpAction=!Execute ["C:\Program Files\Apps\App3.exe"]
Hidden=1

[App4]
Group=Group2
Meter=Image
ImageName=Images\App4.png
W=64
H=64
X=80
Y=80
LeftMouseUpAction=!Execute ["C:\Program Files\Apps\App4.exe"]
Hidden=1

[LeftButton]
Group=Group2
Meter=String
X=0
Y=60
FontSize=15
FontColor=255,255,255,255
SolidColor=0,0,0,1
StringStyle=Bold
AntiAlias=1
Text=<<
LeftMouseUpAction=!Execute [!SetVariable Group1State 1][!SetVariable Group2State 0]

[RightButton]
Group=Group1
Meter=String
X=170
Y=60
FontSize=15
FontColor=255,255,255,255
SolidColor=0,0,0,1
StringStyle=Bold
AntiAlias=1
Text=>>
LeftMouseUpAction=!Execute [!SetVariable Group2State 1][!SetVariable Group1State 0]
bazsi44
Posts: 12
Joined: May 2nd, 2011, 2:50 pm

Re: IF Action

Post by bazsi44 »

I solve this problem! :thumbup:

but now, i have another one.

can i make a button which working like this.

If config is deactivated, !RainmeterActivateConfig
If config is activated, !RainmeterDeactivateConfig.

so I have a button, and if I push this, the config become activated.
and if I push again, the config become deavtivated.

so simple on-off button, which I have to.
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: IF Action

Post by Kaelri »

Code: Select all

!ToggleConfig "ConfigName"
More.