Else

Used along with an If action to provide an alternate code block to execute only if the condition is false. 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. If combined with Else is an extremely useful combination. These actions 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

<AMELSE>

Example

Simple If/Else Statement that displays the answer in a message box.

<AMIF EXPRESSION="2 &lt; 1">

<AMSHOWDIALOG>The result is TRUE.</AMSHOWDIALOG>

<AMELSE />

<AMSHOWDIALOG>The result is FALSE.</AMSHOWDIALOG>

</AMIF>

See Also

If, 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