It is currently May 1st, 2024, 11:07 pm

Issues with !SetVariable on Left Mouse Up

Get help with creating, editing & fixing problems with skins
CapitalDave
Posts: 1
Joined: August 14th, 2012, 4:30 pm

Issues with !SetVariable on Left Mouse Up

Post by CapitalDave »

I'm extremely new to customising rainmeter skins, but have been trying to make a basic skin which will add 1 each time it is clicked on, up to a maximum amount, then cycle. I think I have got the base of this skin to make sense, but I cannot for the life of me get !Setvariable to work on LeftMouseUp.

This is the code I have made so far (a bit of a Frankenstein's monster of other codes).

Code: Select all

[Rainmeter]
Update=1000


[Variables]
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
MaxNumber=3
Clicks=0


=====


[measureDATE]
Measure=Time
Format=%d.%m.%y

[measureNUMBER]
Measure=Calc
Formula=#Clicks#%(#MaxNumber#+1)

=====


[styleTitle]
StringAlign=CENTER
StringCase=UPPER
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1


[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15


=====


[meterDate]
Meter=String
MeterStyle=styleTitle
Text=[measureDATE]
X=100
Y=2
W=150
H=18
DynamicVariables=1

[meterTitle]
Meter=String
MeterStyle=styleTitle
Text=DOTA2 Games Quota
X=100
Y=14
W=150
H=18
DynamicVariables=1

[meterNumber]
Meter=STRING
MeterStyle=styleTitle
Text=[measureNUMBER]
X=100
Y=26
W=190
H=18
LeftMouseUpAction=!SetVariable Clicks "(#Clicks#+1)"
DynamicVariables=1

[meterBar]
Meter=BAR
MeterStyle=styleBar
MeasureName=measureNUMBER
X=25
Y=40
W=150
H=2
Could anyone help point me in the right direction as to how to fix it?
Many Thanks,
Dave
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am

Re: Issues with !SetVariable on Left Mouse Up

Post by Kaelri »

The !SetVariable action is working fine. You're just missing a DynamicVariables=1 on [measureNUMBER], so it's not seeing the changes to #Clicks#.

Code: Select all

[measureNUMBER]
Measure=Calc
Formula=#Clicks#%(#MaxNumber#+1)
DynamicVariables=1