It is currently April 19th, 2019, 7:22 pm

Counting down to 1 instead of 0

Help with creating, editing & fixing problems with skins
User avatar
qwerky
Posts: 180
Joined: April 10th, 2014, 12:31 am
Location: Canada

Re: Counting down to 1 instead of 0

qwerky » April 16th, 2019, 5:40 pm

balala wrote:
April 16th, 2019, 7:34 am
Well, good, just that the Formula should have to be:

Code: Select all

[MeasureCount]
...
Formula=(((MeasureCount+#counterMax#-2)%#counterMax#)+1)
(supposing as can be seen above that the measure is named [MeasureCount]).
By simply using your Formula won't change the value of the counter variable and the measure won't count down.
Otherwise congratulations, as you can see, as well as many other times, here are more possible solutions, from which we can choose if we need to.
Yes, you're right of course. I should have made it clear that I was just presenting the formula, to be used in which ever manner was required. In my case, I was looping a variable, rather than a measure. Thanks for confirming! :D
User avatar
balala
Rainmeter Sage
Posts: 8079
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Counting down to 1 instead of 0

balala » April 16th, 2019, 6:27 pm

qwerky wrote:
April 16th, 2019, 5:40 pm
Yes, you're right of course. I should have made it clear that I was just presenting the formula, to be used in which ever manner was required. In my case, I was looping a variable, rather than a measure. Thanks for confirming! :D
Yes, the formula works correctly, it does what it has to. However it can be used only if you want to count down to 1 (yep, I know this is name of this topic, however...). If would be needed to count down to another value, well...