Search code examples
rainmeter

How do I restart this countdown in Rainmeter?


I'm trying to build a very simple countdown that restarts once it reaches 0. Why isn't the code on Line 15 (IfBelowAction) working? What would be an alternative method to accomplish this?

[Rainmeter]
Update=1000
DynamicWindowSize=1

[Metadata]
Name=Test
Author=jjnnugent
Information=Test skin.
Version=1.0.0

[MeasureMeter]
Measure=Calc
Formula=10
IfBelowValue = 0
IfBelowAction=[!SetOption MeasureMeter Formula "10"]
OnUpdateAction=[!SetOption MeasureMeter Formula "MeasureMeter - 1"]

[MeasureString]
Meter=String
MeasureName=MeasureMeter
FontSize=18
FontColor=255,255,255
SolidColor=50,50,50,175
StringStyle=Bold
AntiAlias=1
Text=Seconds left %1

Solution

  • [MeasureMeter]
    Measure=Calc
    Formula=(MeasureMeter-1+(10+1))%(10+1)
    

    Found the answer covered in their documentation under Bonus Lesson: https://docs.rainmeter.net/tips/counters-guide/