Control Structure - IF

Marks the beginning of an IF block.

Action ID:
Action Category:
Action List Syntax:

200
Control Structure
IF (<<CONDITION>>)

Condition

The conditional expression that must resolve to true in order for the actions in the IF block to be performed.

If the expression evaluates to true, all of the actions following the IF action will be executed until the corresponding END IF or ELSE is found.

If the expression evaluates to false, AutoPlay will jump to the corresponding ELSE action, or (if there is no corresponding ELSE action) to the END IF action that marks the end of the IF block.

Build...

Opens the Build Expression dialog which provides a useful interface to help you build the conditional expression.

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

 

 

1

MSG_ERR_EVALUATE_EXPRESSION

MSG_ERR_EVALUATE_EXPRESSION
MSG_ERR_EXPRESSION_MISSING_VALUE
Error Position

<<CONDITION>>

2

MSG_ERR_EVALUATE_EXPRESSION

MSG_ERR_EVALUATE_EXPRESSION
MSG_ERR_EXPRESSION_MISSING_PARENTHESIS
Error Position

<<CONDITION>>

80

MSG_ERR_EVALUATE_EXPRESSION

MSG_ERR_EVALUATE_EXPRESSION
MSG_ERR_EXPRESSION_MISSING_ENDLOOP
<<CONDITION>>

Examples

Adding an item to a delimited string

Adding items to a list box (with data)

Browsing for and playing an MP3

Detecting the operating system

Expiring 30 days after building

Expiring 30 days after running the first time

Getting the index of the currently selected item

Loading and playing a different AVI

Moving a window (advanced)

Opening a web page in the user's default browser

Pausing an MP3

Playing a different Flash animation

Playing an AVI

Replacing text in an edit field

Running a PowerPoint presentation

Running a PowerPoint presentation (advanced)

Storing information in the Registry

Verifying a password

Verifying a password (advanced)