Creates a Control of Flow block. The commands enclosed within the If Statement and EndIf will only be executed if the evaluated statement returns TRUE, which can be a number different than 0 or a non-empty string.
If Statements (F10)
Selects the statement to evaluate. If the statement resolves to true the commands inside below the If Statement will be executed, otherwise they will be skipped until EndIf or an Else is reached.
For Compare Variables the Variable (left of the operator) should NOT be enclosed in percent signs. The Value (right of operator) can be any valid expression when the operator is one of the ones below:
=, ==, <>, !=, >, <, >=, <=.
Strings must be enclosed in quotes.
For the other operators you can use variables enclosed in percent signs or literal strings without quotes.
Evaluate Expression can evaluate any valid expression as true or false. Variables must NOT be enclosed in percent signs. For more information see Expressions.
To evaluate two or more statements you can use the Evaluate Expression option as it supports multiple statements (e.g. Var > 10 && Var < 20) or you can add them in sequence in the list, each one with a corresponding EndIf.
For more details on usage with other commands see Variables.
IfWinActive / IfWinNotActive, IfWinExist / IfWinNotExist, IfExist / IfNotExist, IfInString / IfNotInString, IfMsgBox, If Statements