End Select/Case Action

Declaration

</AMCASE>

</AMSELECTCASE>

See Also

End Case Action-Properties,  End Select Action-Properties, Select/Case Action, The BASIC Language All Groups, Else Action, End If Action

Description

The "End Select" action ends a block of Select/Case steps.

The "End Case" action ends a block of steps started by a preceding Case action.

 

Practical Usage

The "End Select" action must be used with a Select <AMSELECTCASE> step to end the block of Select/Case steps.

The "End Case" action must be used with a Case <AMCASE> step to end a block of steps started by a preceding Case action.

 

Parameters

General Tab

No parameters.

 

Notes

Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

Standard Error Handling Options

This action also includes the standard Error Causes and On Error failure handling options/tabs.

More on Error Handling Options

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

 

Examples

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 <AMSELECTCASE EXPRESSION="%Weekday(Now())%">
<AMCASE CONSTANT="1">
  <AMMESSAGEBOX>Sunday</AMMESSAGEBOX>
</AMCASE>
<AMCASE CONSTANT="2">
  <AMMESSAGEBOX>Monday</AMMESSAGEBOX>
</AMCASE>
<AMCASE CONSTANT="3">
  <AMMESSAGEBOX>Tuesday</AMMESSAGEBOX>
</AMCASE>
<AMCASE CONSTANT="4">
  <AMMESSAGEBOX>Wednesday</AMMESSAGEBOX>
</AMCASE>
<AMCASE CONSTANT="5">
  <AMMESSAGEBOX>Thursday</AMMESSAGEBOX>
</AMCASE>
<AMCASE CONSTANT="6">
  <AMMESSAGEBOX>Friday</AMMESSAGEBOX>
</AMCASE>
<AMCASE CONSTANT="7">
  <AMMESSAGEBOX>Saturday</AMMESSAGEBOX>
</AMCASE>
<AMCASE>
  <AMMESSAGEBOX>Something went horribly wrong</AMMESSAGEBOX>
</AMCASE>
</AMSELECTCASE>