It is currently June 25th, 2019, 6:26 am

"Reset" a measure?

Help with creating, editing & fixing problems with skins
User avatar
JelleDekkers
Posts: 16
Joined: September 27th, 2017, 6:32 pm

"Reset" a measure?

JelleDekkers » 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).
User avatar
balala
Rainmeter Sage
Posts: 8308
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: "Reset" a measure?

balala » April 25th, 2019, 8:24 am

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: 16
Joined: September 27th, 2017, 6:32 pm

Re: "Reset" a measure?

JelleDekkers » April 25th, 2019, 8:25 am

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

Re: "Reset" a measure?

balala » April 25th, 2019, 11:27 am

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.