It is currently April 27th, 2024, 5:47 pm

how do you use "IfConditionMode=1"? (help!!!!)

Get help with creating, editing & fixing problems with skins
Thorgone
Posts: 2
Joined: December 26th, 2023, 10:14 pm

how do you use "IfConditionMode=1"? (help!!!!)

Post by Thorgone »

can someone explain how to use the "IfConditionMode=1" with IfCondition statements? (to have the statement run the action on every update if true/false )
thanks!!!!!!!!!
User avatar
balala
Rainmeter Sage
Posts: 16178
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: how do you use "IfConditionMode=1"? (help!!!!)

Post by balala »

Thorgone wrote: December 26th, 2023, 10:19 pm can someone explain how to use the "IfConditionMode=1" with IfCondition statements?
There is not to much to say. If you add an IfConditionMode=1 to a measure having IfCondition(s), you'll get executed the appropriate IfTrueAction / IfFalseAction option on every update of the measure. This means that with the default Update=1000 of the skin, the appropriate option is executed once per second. If the IfConditionMode option is not added (or if it's set to 0), the IfTrueAction / IfFalseAction is executed only once, when the IfCondition changes its truth value.
See an example: let's say the IfConditionMode is not added to a measure and the IfCondition is false. When it switches to true, IfTrueAction is executed only once. You don't get it executed once more as long as the IfCondition is true. When it becomes false, you get executed the IfFalseAction option, only once. As long as the condition is kept false, IfFalseAction is not re-executed. When the condition once again switches to true, the IfTrueeAction is once again executed, but just only once, as long as the IfCondition is kept true. And so on.
If the above measure has an IfConditionMode=1 option added, the one of the IfTrueAction / IfFalseAction option is executed on every update cycle of the skin. Having an Update set to Update=1000 in the [Rainmeter] section, this means one execution of one of these options per second.
There is a huge difference between the two cases, but adding the IfConditionMode to a measure requires attention: you can easily create an infinite loop, for instance by adding a bang to ItTrueAction and IfFalseAction option which should update the measure itself.
Please feel free to come back if you have any further question related to this.
Thorgone
Posts: 2
Joined: December 26th, 2023, 10:14 pm

Re: how do you use "IfConditionMode=1"? (help!!!!)

Post by Thorgone »

Thanks!!!!!!
User avatar
balala
Rainmeter Sage
Posts: 16178
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: how do you use "IfConditionMode=1"? (help!!!!)

Post by balala »

Thorgone wrote: December 27th, 2023, 5:24 pm Thanks!!!!!!
Did I help? I'm glad if I did...