If

Begins a block of steps that are executed conditionally. Very often when you create a task, you want it to perform different actions for different decisions. You can use conditional statements in your code to do this. The If action along with the Else action are conditional statements that can perform different actions during the course of a task depending on the result of an expression evaluation. If the result evaluates to TRUE, AWE will execute the block of steps immediately following the If action up until an End If step is encountered, otherwise the block will be skipped (or if an Else statement is encountered it will execute that block of steps). All If actions must be followed at some point with an End If step to mark the end of the code block that is to be executed if the expression is true.

Declaration

<AMIF EXPRESSION="text">

See Also: If Compare Files, If File Exists, If Folder Exists, If Last Step, If Pixel Exists, If Process Running, If Text Contains, If Windows Exists, End If, End Select/Case, Goto, Label, Select/Case

General Tab

Property

Type

Required

Default

Markup

Description

Expression

Text

Yes

(Empty)

EXPRESSION="1 > 2"

Indicates a valid BASIC expression. The Simple method allows you to enter simple expressions. The Complex method allows entry of more elaborate expressions.

NOTE: All literal strings (strings to be taken as themselves) must be enclosed in double quotes. Example: "string literal".