It is currently March 29th, 2024, 11:17 am

"Reset" a measure?

Get help with creating, editing & fixing problems with skins
User avatar
JelleDekkers
Posts: 127
Joined: September 27th, 2017, 6:32 pm
Location: Netherlands

"Reset" a measure?

Post by JelleDekkers »

Hi, is there a way to "reset" a measure? As if you refreshed the skin, but without actually refreshing the skin and only for the specified measure.

For example, let's say I have a counter that just does +1 every update cycle. I'd want to "reset" it, so it starts over (starts at 0 again, but still continues counting).
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: "Reset" a measure?

Post by balala »

JelleDekkers wrote: April 25th, 2019, 7:22 am Hi, is there a way to "reset" a measure? As if you refreshed the skin, but without actually refreshing the skin and only for the specified measure.

For example, let's say I have a counter that just does +1 every update cycle. I'd want to "reset" it, so it starts over (starts at 0 again, but still continues counting).
Yes, there is. Use the following bangs: [!DisableMeasure "MeasureName"][!UpdateMeasure "MeasureName"][!EnableMeasure "MeasureName"]. The trick here is that you have to first disable the measure (you get it to zero in a such case), then have to update it and after this you have to reenable it, to get it counting again. Simply disabling and enabling it doesn't work, because the measure keeps its value.
User avatar
JelleDekkers
Posts: 127
Joined: September 27th, 2017, 6:32 pm
Location: Netherlands

Re: "Reset" a measure?

Post by JelleDekkers »

I'm kind of surprised there isn't a bang for this, but I guess this works.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: "Reset" a measure?

Post by balala »

JelleDekkers wrote: April 25th, 2019, 8:25 am I'm kind of surprised there isn't a bang for this,
There is no need of a such bang. As you can see, it can be done with the existing ones.