Quantcast
Viewing all articles
Browse latest Browse all 980

Help: Rainmeter Skins • Trying to set a static time variable

Hello,

I have a sleep log. It starts once a mouse click = then the end on a different mouse click area. The rest is basic math for totaal for a day and the average when 3 days have transpired (averaging less than 3 is kind of donk).

I have been trying set a start time and end time to a variable then writekeyvalue to the inc file.

The problem is after a refresh - to simulate the skin being loaded or unloaded - the time just sets itself to the current time again, ruining the intended variable state.

Code:

[StaticDay0]Meter=StringStringAlign=RightCenterX=154Y=106AntiAlias=1FontFace=#TallFont#FontSize=27FontColor=#ShortBars#StringCase=UpperLeftMouseUpAction=[!ToggleMeterGroup MON][!SetVariable MON "1"][!WriteKeyValue Variables MON "[#MON]" "#@#Utopia.inc"][!Update]DynamicVariables=1Text=MONHidden=#awake#--------------------------------------- MONDAY START --------------------------[MeasureTimeHour0]Measure=TimeFormat=%HPaused=#sZeroPause#DynamicVariables=1[MeasureTimeMinute0]Measure=TimeFormat=%MPaused=#sZeroPause#DynamicVariables=1[MeasureTimeSeconds0]Measure=TimeFormat=%SPaused=#sZeroPause#DynamicVariables=1[Time0]Meter=StringMeasureName=MeasureTimeHour0MeasureName2=MeasureTimeMinute0MeasureName3=MeasureTimeSeconds0StringAlign=LeftCenterX=164Y=106AntiAlias=1FontFace=#TallFont#FontSize=27FontColor=#sZeroColor#StringEffect=BorderFontEffectColor=0,0,0,255StringCase=UpperText=%1:%2:%3Group=monDynamicVariables=1Hidden=1[MeasureStart0]Measure=CalcIfCondition=(#sZero# = 1)IfTrueAction=[!SetVariable sZeroColor #StartColor#][!WriteKeyValue Variables sZeroColor "[#sZeroColor]" "#@#Utopia.inc"][!Update]IfFalseAction=[!SetVariable sZeroColor #CustomOpaque#][!WriteKeyValue Variables sZeroColor "[#sZeroColor]" "#@#Utopia.inc"][!Update]DynamicVariables=1[MeterClick0]Meter=ImageSolidColor=0,0,0,1X=164Y=83W=65H=40LeftMouseUpAction=[!SetVariable sZeroPause "((#sZeroPause#+1)%2)"][!WriteKeyValue Variables sZeroPause "[#sZeroPause]" "#@#Utopia.inc"][!SetVariable sZero "((#sZero#+1)%2)"][!WriteKeyValue Variables sZero "[#sZero]" "#@#Utopia.inc"][!Update]Group=monDynamicVariables=1Hidden=1-------------------------------------- FINISH MONDAY --------------------------[MeasureTimeHourF0]Measure=TimeFormat=%HPaused=#fZeroPause#DynamicVariables=1[MeasureTimeMinuteF0]Measure=TimeFormat=%MPaused=#fZeroPause#DynamicVariables=1[MeasureTimeSecondsF0]Measure=TimeFormat=%SPaused=#fZeroPause#DynamicVariables=1[Time0f]Meter=StringMeasureName=MeasureTimeHourF0MeasureName2=MeasureTimeMinuteF0MeasureName3=MeasureTimeSecondsF0StringAlign=LeftCenterX=274Y=106AntiAlias=1FontFace=#TallFont#FontSize=27FontColor=#fZeroColor#StringEffect=BorderFontEffectColor=0,0,0,255StringCase=UpperText=%1:%2:%3Group=monDynamicVariables=1Hidden=1[MeterClickw]Meter=ImageSolidColor=0,0,0,1X=275Y=82W=65H=40LeftMouseUpAction=[!SetVariable fZeroPause "((#fZeroPause#+1)%2)"][!WriteKeyValue Variables fZeroPause "[#fZeroPause]" "#@#Utopia.inc"][!SetVariable fZero "((#fZero#+1)%2)"][!WriteKeyValue Variables fZero "[#fZero]" "#@#Utopia.inc"][!Update]Group=monDynamicVariables=1Hidden=1[MeasureFinishColorf1]Measure=CalcIfCondition=(#sZeroPause# = 0) && (#fZeroPause# = 1)IfTrueAction=[!SetVariable fZeroColor #CustomOpaque#][!WriteKeyValue Variables fZeroColor "[#fZeroColor]" "#@#Utopia.inc"][!SetVariable fZero "0"][!WriteKeyValue Variables fZero "[#fZero]" "#@#Utopia.inc"][!SetVariable fZeroPause "0"][!WriteKeyValue Variables fZeroPause "[#fZeroPause]" "#@#Utopia.inc"][!Update]IfCondition2=(#sZeroPause# = 1) && (#fZeroPause# = 1)IfTrueAction2=[!SetVariable fZeroColor #FinishColor#][!WriteKeyValue Variables fZeroColor "[#fZeroColor]" "#@#Utopia.inc"][!SetVariable fZero "1"][!WriteKeyValue Variables fZero "[#fZero]" "#@#Utopia.inc"][!SetVariable fZeroPause "1"][!WriteKeyValue Variables fZeroPause "[#fZeroPause]" "#@#Utopia.inc"][!Update]IfFalseAction2=[!SetVariable fZeroColor #CustomOpaque#][!WriteKeyValue Variables fZeroColor "[#fZeroColor]" "#@#Utopia.inc"][!Update]DynamicVariables=1

Code:

[Variables]Mon=0sZeroPause=0fZeroPause=0etc..
I hope this shows enough to adapt any advice into this (and 6 other similar sections for each day of the week that will essentially be the same as the above, barring meter and measure names).

Thanks,
CC

Statistics: Posted by CodeCode — Yesterday, 7:28 pm — Replies 1 — Views 44



Viewing all articles
Browse latest Browse all 980

Trending Articles