If Statements

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)

Parameters

Options DropdownList

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.

Add Else
Add an Else Statement. If the If Statement above it resolves to false the commands below it will be executed instead, otherwise they will be skipped until EndIf is reached. This should be placed before the EndIf.
Else If
Creates an Else If statement, which means that the statement must be inside another If block and will be evaluated only if the If before it evaluates to false. When this option is checked the EndIf row will not be created.

Remarks

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