My Code:
called with:
Code: Select all
[!UpdateMeasure PageMeasure]
Code: Select all
[PageMeasure]
Measure=Calc
Formula=#Page#
IfCondition=(#Page#=1)
IfTrueAction=[!SetOption "MyMeter" "MyMeterOption" "MyMeterOptionValue"]
Jax
Code: Select all
[!UpdateMeasure PageMeasure]
Code: Select all
[PageMeasure]
Measure=Calc
Formula=#Page#
IfCondition=(#Page#=1)
IfTrueAction=[!SetOption "MyMeter" "MyMeterOption" "MyMeterOptionValue"]
EnhancedJax wrote: ↑October 17th, 2020, 12:05 pm For my skin, I wanted it so when I use a bang, it will trigger the measure, which tests what the #page# variable is with IfCondition and execute different actions then. I've tried many things but it didn't seem to work as I would like it to.
My Code:
called with:Measure:Code: Select all
[!UpdateMeasure PageMeasure]
regards,Code: Select all
[PageMeasure] Measure=Calc Formula=#Page# IfCondition=(#Page#=1) IfTrueAction=[!SetOption "MyMeter" "MyMeterOption" "MyMeterOptionValue"]
Jax
Actually, it's quite easy to remember: if you think the value of a variable (which can be a measure/meter itself, for example a section variable) you use in a measure/meter changes while the skin is active, then add DynamicVariables=1 to the said measure/meter; if you don't, then it'll work fine without that line.EnhancedJax wrote: ↑October 17th, 2020, 1:22 pmAlright, seem to always forgot to add that to my meters, thanks for pointing out!
A skin update (i.e. the one based on the Update value in the [Rainmeter] section of a skin) will usually trigger the update of all its elements, so in most cases, "per update" and "on measure update" are the same thing. Of course, given the fact that you can have different UpdateDividers for the skin elements or even have Disabled measures, this won't always be true, but these are just exceptions from the rule.EnhancedJax wrote: ↑October 17th, 2020, 1:22 pmIt's working perfectly, but will it action per update or just when I update the measure? If so how can I make it not?
by changing it so:the action is executed only once when the condition becomes "true", so it needs to become "false" and again "true" to execute again
basically relating to what I said earlier about the subtle difference in behavior based on the change in the logical result of the condition.the evaluation of the condition will execute the appropriate actions in IfTrueAction or IfFalseAction on every update of the measure
Maybe I'm misunderstanding your question, but take in account the followings: as Yincognito said, the IfTrueAction is executed only once, when the condition stated into the IfCondition option becomes true. For a new execution, the condition has to turn to false, then to true again. The IfConditionMode=1 (IfMatchAction=1) option can avoid this, if it's added to the measure, the IfTrueAction will be executed on each update of the measure, while the condition is true.EnhancedJax wrote: ↑October 17th, 2020, 1:22 pm but will it action per update or just when I update the measure? If so how can I make it not?
You probably meant IfConditionMode, since the OP test is numerical, in this case.
Right. My usual inatention. Sorry, fixing my above reply...Yincognito wrote: ↑October 17th, 2020, 6:10 pm You probably meant IfConditionMode, since the OP test is numerical, in this case.
Yep, I was actually going to add that you don't have to say "sorry" on this one to the above post. Too late, it seems...
On such a trivial mistake I have to add it for sure.Yincognito wrote: ↑October 17th, 2020, 6:23 pm Yep, I was actually going to add that you don't have to say "sorry" on this one to the above post. Too late, it seems...
And I probably shouldn't have mentioned such a trivial mistake. Oops, my time to say sorry...