It is currently March 28th, 2024, 9:41 pm

Interlinked if or the way not to run a mesure

Get help with creating, editing & fixing problems with skins
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Interlinked if or the way not to run a mesure

Post by balala »

qwerky wrote: April 15th, 2019, 7:06 pm But if that measure, balala, had some actions on it (which was the scenario I was dealing with, when I came across this issue), I believe those actions would execute when the measure was enabled--though I haven't tested this on your example.
Please test it and let us know what's going on.
However, guys, have you noticed we are on off topic? :rolmfao:
User avatar
Yincognito
Rainmeter Sage
Posts: 7028
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Interlinked if or the way not to run a mesure

Post by Yincognito »

balala wrote: April 15th, 2019, 7:12 pm However, guys, have you noticed we are on off topic? :rolmfao:
Not really, since as I mentioned, I do have such a case in the code I posted for the OP. Plus, I don't think he'll mind us talking about this, since his problem is essentially solved. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Interlinked if or the way not to run a mesure

Post by balala »

Yincognito wrote: April 15th, 2019, 7:27 pm Not really, since as I mentioned, I do have such a case in the code I posted for the OP. Plus, I don't think he'll mind us talking about this, since his problem is essentially solved. ;-)
Yeah, probably... :great:
User avatar
qwerky
Posts: 182
Joined: April 10th, 2014, 12:31 am
Location: Canada

Re: Interlinked if or the way not to run a mesure

Post by qwerky »

balala wrote: April 15th, 2019, 7:12 pm Please test it and let us know what's going on.
After brief testing on your example, I am not seeing update-on-enable, though I am sure that I did see that action in my own work some time back. However, I am out of time right now, and bow to your guys' superior experience! :sly:
User avatar
Yincognito
Rainmeter Sage
Posts: 7028
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Interlinked if or the way not to run a mesure

Post by Yincognito »

qwerky wrote: April 15th, 2019, 7:29 pm After brief testing on your example, I am not seeing update-on-enable, though I am sure that I did see that action in my own work some time back.
Could be that what you saw was just the regular update of the measure on the following update cycle? Just guessing here...

EDIT: Although, if I think about it, I'm not sure the measure will even be enabled, if not updated with a bang afterwards... :confused: By the way, I was so affected by my experience with this that I even !UpdateMeasure after disabling it! :rolmfao: Just to be sure, you know...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Interlinked if or the way not to run a mesure

Post by balala »

Yincognito wrote: April 15th, 2019, 7:32 pm Could be that what you saw was just the regular update of the measure on the following update cycle? Just guessing here...

EDIT: Although, if I think about it, I'm not sure the measure will even be enabled, if not updated with a bang afterwards... :confused: By the way, I was so affected by my experience with this that I even !UpdateMeasure after disabling it! :rolmfao: Just to be sure, you know...
A disabled measure can be updated. A classical example of needing a such action is when you want to restart a counting measure.
For example:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Timer]
Measure=Calc
Formula=( Timer + 1 )

[MeterTest]
Meter=String
MeasureName=Timer
FontSize=12
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=15,5,15,5
AntiAlias=1
Text=%1
If you load the above skin, you'll see a counting number. How can you reset it, to make it to start the counting again? Well, you need a properly written action. Probably most users would add the following LeftMouseUpAction to the [MeterTest] meter: LeftMouseUpAction=[!DisableMeasure "Timer"][!EnableMeasure "Timer"]. But this won't work (won't reset the measure), because the measure is disabled and immediately reenabled and in meantime it keeps its value. But if in meantime you are update it as well (adding a [!UpdateMeasure "Timer"] bang), you can get it reset. You have to use the following LeftMouseUpAction: LeftMouseUpAction=[!DisableMeasure "Timer"][!UpdateMeasure "Timer"][!EnableMeasure "Timer"].
User avatar
Yincognito
Rainmeter Sage
Posts: 7028
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Interlinked if or the way not to run a mesure

Post by Yincognito »

balala wrote: April 15th, 2019, 7:59 pm A disabled measure can be updated. A classical example of needing a such action is when you want to restart a counting measure.
That's exactly the type of measure I experienced that behavior with. :lol: And that's exactly why I disabled the measure, to reset it (or better said, set it to 0). Talking about coincidences... :D
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Interlinked if or the way not to run a mesure

Post by balala »

Yincognito wrote: April 15th, 2019, 8:09 pm Talking about coincidences... :D
RNestaM
Posts: 12
Joined: April 9th, 2019, 5:59 pm

Re: Interlinked if or the way not to run a mesure

Post by RNestaM »

Yincognito wrote: April 15th, 2019, 7:27 pm Not really, since as I mentioned, I do have such a case in the code I posted for the OP. Plus, I don't think he'll mind us talking about this, since his problem is essentially solved. ;-)
I still here :Whistle

I'm pleased to see my problem is source of debate :D
User avatar
Yincognito
Rainmeter Sage
Posts: 7028
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Interlinked if or the way not to run a mesure

Post by Yincognito »

RNestaM wrote: April 16th, 2019, 12:23 am I still here :Whistle

I'm pleased to see my problem is source of debate :D
Of course you are. ;-) Just like I'm also pleased to see that the OP (you, that is) just gave his official support for going off topic. :lol:
Now we can safely talk about weather and football matches, yay! 8-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth