Quote from
Gaev on September 30, 2023, 2:38 am
@naomi
IfEx "[color] <> pink OR [color] <> red"
Even with the [color] variable set to "pink", the AlertBox "No color chosen" comes up.
You have used the Logical Operator OR ... this means that if any one of the conditions is true, the IfEx condition is considered true.
So, when [color] is set to "pink", it is not "red" ... hence the second condition is true ... hence the IfEx returns a true.
Try this ...
IfEx "[color] <> pink AND [color] <> red"
... now when [color] is red or pink, it will return a false, but if it were (say) green, both conditions will be true and IfEx will return a true.
@naomi
IfEx "[color] <> pink OR [color] <> red"
Even with the [color] variable set to "pink", the AlertBox "No color chosen" comes up.
You have used the Logical Operator OR ... this means that if any one of the conditions is true, the IfEx condition is considered true.
So, when [color] is set to "pink", it is not "red" ... hence the second condition is true ... hence the IfEx returns a true.
Try this ...
IfEx "[color] <> pink AND [color] <> red"
... now when [color] is red or pink, it will return a false, but if it were (say) green, both conditions will be true and IfEx will return a true.