However while playing around I started thinking about the fact that all the words (Days, Hours, Minutes) are in the plural format. This means that if one of the values is 1 then it would look weird. e.g.Uptime: 2 Days, 11 Hours, 36 Minutes
So I decided to take a look at how IfActions work to see if I could change the output format based on the value of each of the parts. So if the system has been up for 1 minute it will display as Minute instead of Minutes.Uptime: 1 Days, 1 Hours, 1 Minutes
However I ran into a bit of a snag while playing around with using UpTime and IfActions.
I'm not sure if it's because of how UpTime returns each of the values, or if I'm using the IfActions incorrectly but my IfAction doesn't appear to be called when the values match.
Code: Select all
[Rainmeter]
Update=1000
Background=#@#Background.png
BackgroundMode=3
BackgroundMargins=0,34,0,14
[Variables]
fontName=Trebuchet MS
textSize=8
colorText=255,255,255,205
CurrentState="%3!i! Wakka"
;-------------------------------------------------
[MeasureUpTime]
Measure=UpTime
AddDaysToHours=0
IfEqualValue=6
IfEqualAction=!Execute [!RainmeterSetVariable CurrentState "%3!i! Day"]
Format=#CurrentState#
;-------------------------------------------------
[styleLeftText]
StringAlign=LEFT
StringCase=NONE
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1
;-------------------------------------------------
[MeterUpTime]
Meter=String
MeterStyle=styleRightText
MeasureName=MeasureUpTime
X=10
Y=40
W=190
H=14
Text="Uptime: %1"