Select/Case Action Icon

End Select / End Case

Declaration

</AMCASE>

</AMSELECTCASE>

See Also

Else | End If | End Select/Case | Goto | 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 | Label | Select/Case

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 step in order to end the block of Select/Case steps.

The End Case action must be used with a Case step in order to end a block of steps started by a preceding Case action.

Parameters

General Properties

(No Parameters)

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties lets you instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Expressions, Variables & Functions

A percent sign is used as a special character in AutoMate to indicate the beginning and end of an expression. This allows variables, functions and other expressions to be entered in any text parameter of a task's properties. For example: %1+1% inside a task will resolve to 2 at runtime. A more elaborate example is %FileDateTime(myFile)% which results to the date/time of myFile. To help construct expressions, you can open Expression Builder by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on functions

More on extended functions
More on the expression builder

Example

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

 

Description: This example uses a Select/Case combination along with a Weekday() function to determine the day of the week.

 

<AMSELECTCASE EXPRESSION="%Weekday(Now())%">

     <AMCASE CONSTANT="1">

          <AMSHOWDIALOG>Today is Sunday.</AMSHOWDIALOG>

     </AMCASE>

     <AMCASE CONSTANT="2">

          <AMSHOWDIALOG>Today is Monday.</AMSHOWDIALOG>

     </AMCASE>

     <AMCASE CONSTANT="3">

          <AMSHOWDIALOG>Today is Tuesday.</AMSHOWDIALOG>

     </AMCASE>

     <AMCASE CONSTANT="4">

          <AMSHOWDIALOG>Today is Wednesday.</AMSHOWDIALOG>

     </AMCASE>

     <AMCASE CONSTANT="5">

          <AMSHOWDIALOG>Today is Thursday.</AMSHOWDIALOG>

     </AMCASE>

     <AMCASE CONSTANT="6">

          <AMSHOWDIALOG>Today is Friday.</AMSHOWDIALOG>

     </AMCASE>

     <AMCASE CONSTANT="7">

          <AMSHOWDIALOG>Today is Saturday.</AMSHOWDIALOG>

     </AMCASE>

     <AMCASE CONSTANT="8">

          <AMSHOWDIALOG>Something went horribly wrong.</AMSHOWDIALOG>

     </AMCASE>

</AMSELECTCASE>

</AMIF>

 

↑ [Top of Page]