It is currently May 4th, 2024, 4:00 pm
Get help with creating, editing & fixing problems with skins
Ryn
Posts: 18 Joined: May 7th, 2020, 8:11 am
Post
by Ryn » May 27th, 2020, 3:46 am
Hi, I was wondering, is there a way to have a loop be inactive upon launching the skin?
Code: Select all
[LoopTimer1]
Measure=Loop
StartValue=0
EndValue=(#LevelTime#+1)
LoopCount=1
DynamicVariables=1
IfCondition=LoopTimer1>=#LevelTime#
IfTrueAction=[!SetVariable Program1Level (#Program1Level#+1)][!WriteKeyValue Variables Program1Level "#Program1Level#" "#@#Level.inc"]
I want to make it so this only runs when I hit the button, but right now it runs as soon as the program starts.
balala
Rainmeter Sage
Posts: 16198 Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania
Post
by balala » May 27th, 2020, 6:14 am
Ryn wrote: ↑ May 27th, 2020, 3:46 am
Hi, I was wondering, is there a way to have a loop be inactive upon launching the skin?
Yep, there actually is. Just add a
Disabled=1 option to the measure.
Ryn
Posts: 18 Joined: May 7th, 2020, 8:11 am
Post
by Ryn » May 27th, 2020, 6:39 am
Awesome thanks!
I ended up using paused=1 to do it since it suits the function better.
balala
Rainmeter Sage
Posts: 16198 Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania
Post
by balala » May 27th, 2020, 8:05 am
Ryn wrote: ↑ May 27th, 2020, 6:39 am
I ended up using paused=1 to do it since it suits the function better.
Yep, that's another solution, however there is a difference between disabling and pausing the measure.
If the measure is disabled, its numerical value is 0, while if it's paused it keeps its value, but that's not incremented. For instance if the StartValue is set to another value than 0, if you disable the measure, its value is 0, while if you pause it, the value it gets is the StartValue.
Ryn
Posts: 18 Joined: May 7th, 2020, 8:11 am
Post
by Ryn » May 27th, 2020, 8:36 am
Im glad I paused it then instead of disabling. The system shouldn't reset to 0 every time I start and stop it.
balala
Rainmeter Sage
Posts: 16198 Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania
Post
by balala » May 27th, 2020, 10:03 am
Ryn wrote: ↑ May 27th, 2020, 8:36 am
Im glad I paused it then instead of disabling. The system shouldn't reset to 0 every time I start and stop it.
Yep, this is an advantage of pausing, instead of disabling it. Good work.