If Variable
Conditionally play a set of steps based on the value of a logical expression. If the logical expression evaluates to TRUE,
any steps following 'If' and preceding 'Else' or 'End If' (whichever occurs first) are played.
If the logical expression evaluates to 'FALSE' and 'Else' is included, any steps after 'Else' and before 'End If' are Played.
If the logical expression evaluates to 'FALSE' and 'Else' isn't included, Macro Player will goto the first step following 'End If' and any
steps between 'If' and 'End If' are ignored.
Click here to show the figure
Parameters
-
Variable Spcifies the name of variable to be evaluated.
-
Comparison operator Specifies the comparison operator, it should be Equal, Not equal, Less than, Greater than, Contain and Not contain.
-
Value for comparing Specifies an expression of value.
-
Match case for string value Specifies whether to distinguishe between uppercase and lowercase characters if the variable holds a string value.
Remark:
Since the variable can hold many types of value, such as string, number or date-time,
Macro Player will be applied to the following evaluation rule:
| Operator |
Rule |
| Equal |
If the option 'As a string' checked, Macro Player considers the value a string and then to evaluate the logical expression, otherwise,
Macro Player will convert the value to number before evaluating.
Example: if 'As a string' checked, the variable holds a string value "12.05" and the parameter 'value' is "12.0500",
Macro Player directly compare "12.05" and "12.0500" and get the result FALSE.
if 'As a string' unchecked, Macro Player first convert "12.05" to a number 12.05, and convert "12.0500" to a number 12.05,
and then evaluate the expression "12.05 equal 12.05", the result will be TRUE.
|
| Not equal |
Sames as Equal |
| Less than |
Value will be converted into a number to evaluate.
Example: if the variable holds a string value "abc" and the parameter 'value' is "34jdc",
Macro Player will convert "abc" to number "0" and "34jdc" to number "34", and then evaluate
the logical expression "0 less than 34", the result will be TRUE.
|
| Greater than |
Sames as Less than |
| Contain |
Value will be as a string to evaluate.
Example: if the variable holds a number "1234" and the parameter 'value' is "34",
Macro Player will evaluate the logical expression to the result TRUE.
|
| Not contain |
Sames as Contain |
|