Note that in a such case the measure is running once, when the skin is refreshed.Yincognito wrote: ↑April 15th, 2019, 4:30 pm Obviously, having an UpdateDivider=-1 on that measure makes it run only on demand.
It is currently March 29th, 2024, 5:47 am
Interlinked if or the way not to run a mesure
-
- 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
-
- Rainmeter Sage
- Posts: 7029
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Interlinked if or the way not to run a mesure
I am on mobile currently, so I couldn't notice it.
Yeah, sometimes we tend to overcomplicate things...
-
- Rainmeter Sage
- Posts: 7029
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Interlinked if or the way not to run a mesure
But not if the measure is disabled from the start, am I right?
-
- 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
Yeah, completely. I meant it is ran once if it's not disabled and has added the UpdateDivider=-1 option. If it's disabled (with the added Disabled=1 option), obviously it doesn't run at all.Yincognito wrote: ↑April 15th, 2019, 4:54 pm But not if the measure is disabled from the start, am I right?
-
- Rainmeter Sage
- Posts: 7029
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
-
- Posts: 182
- Joined: April 10th, 2014, 12:31 am
- Location: Canada
Re: Interlinked if or the way not to run a mesure
But note that when it becomes enabled (eg. with a bang), it will run that one time, just as it would have at refresh, had it been enabled then.
-
- Rainmeter Sage
- Posts: 7029
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Interlinked if or the way not to run a mesure
A bit related to that, from your experience (I'm including balala here), is it enough to enable the measure to make it run, or you also have to !UpdateMeasure it? I've come across such a situation and I had to also update it in order for the measure to run (although not expecting that, I found the behavior logical after a while).
Now, of course, maybe the particularities of the measure where I encountered that behavior played a part (the same row bangs issue we talked about in the past), that's why I would be interested in finding out if any of you guys experienced the same behavior.
-
- 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
qwerky, unfortunately, as Yincognito said, you're not completely right. Take the following sample code:Yincognito wrote: ↑April 15th, 2019, 6:47 pm A bit related to that, from your experience (I'm including balala here), is it enough to enable the measure to make it run, or you also have to !UpdateMeasure it? I've come across such a situation and I had to also update it in order for the measure to run (although not expecting that, I found the behavior logical after a while).
Now, of course, maybe the particularities of the measure where I encountered that behavior played a part (the same row bangs issue we talked about in the past), that's why I would be interested in finding out if any of you guys experienced the same behavior.
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
[Timer]
Measure=Calc
Formula=5
Disabled=1
UpdateDivider=-1
[StringStyle]
FontSize=12
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=15,5,15,5
AntiAlias=1
[MeterTest]
Meter=String
MeterStyle=StringStyle
MeasureName=Timer
Text=Measure: %1
DynamicVariables=1
[MeterEnable]
Meter=String
MeterStyle=StringStyle
X=0r
Y=5R
Text=Enable
DynamicVariables=1
LeftMouseUpAction=[!EnableMeasure "Timer"]
[MeterUpdate]
Meter=String
MeterStyle=StringStyle
X=0r
Y=5R
Text=Update
DynamicVariables=1
LeftMouseUpAction=[!UpdateMeasure "Timer"][!Redraw]
Now if you refresh (load) the skin, it shows 0 (as probably expected). Now the surprise: if you click Enable (enabling this way the [Timer] measure), the string is still kept on 0. To get its value (5), you have to update it, clicking the Update string.
-
- Rainmeter Sage
- Posts: 7029
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Interlinked if or the way not to run a mesure
Yep, I was worried that in the code I posted for the OP, the bangs from the last meter would update twice the DeleteCaseGroup:
Code: Select all
[DeleteSelected]
Meter=IMAGE
ImageName=#@#Images\Delete.png
x=5R
y=7
LeftMouseUpAction=[!EnableMeasureGroup "DeleteCaseGroup"][!UpdateMeasureGroup "DeleteCaseGroup"][!Refresh]
DynamicVariables=1
-
- Posts: 182
- Joined: April 10th, 2014, 12:31 am
- Location: Canada
Re: Interlinked if or the way not to run a mesure
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.