Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 482

[Quirk] IfCondition=0 or 1

$
0
0
I used IfCondition incorrectly, as if it was IfAboveValue/IfBelowValue/etc, and discovered a quirk.

Code:

[mZero] ;Always returns falseMeasure=CalcIfCondition=0IfTrueAction=!Log "0 True"IfFalseAction=!Log "0 False"[mOne] ;Always returns trueMeasure=CalcIfCondition=1IfTrueAction=!Log "1 True"IfFalseAction=!Log "1 False"
These actions trigger on skin load/refresh. It does not matter what the value of the measure is. If IfConditionMode=1, they will trigger every update. Only the values 0 and 1 cause an action to be triggered.

This quirk makes sense considering that 0 == false and 1 == true in C.

Statistics: Posted by killall-q — Yesterday, 10:08 pm — Replies 1 — Views 72



Viewing all articles
Browse latest Browse all 482

Trending Articles