Dialog - Browse for folder
Declaration
<AMSHOWDIALOG ACTIVITY="folder" WINDOWTITLE="text" RESULTVARIABLE="text" DEFAULTFOLDER="text" ONCANCEL="text (options)" /> |
Description: Displays a standard 'Browse For Folder' dialog box allowing the user to browse and select a specific folder during runtime. The selected folder is stored in a variable for use in subsequent steps. Execution is paused while the user makes a selection.
Practical Usage
Commonly used to allow a user to manually select a folder to open during task execution.
General Parameters
Parameter |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Descriptive text (displayed above the folder tree) |
Text |
No |
(Empty) |
TITLE="Select Folder" |
The title that the dialog box should display (e.g., "Please select a target folder then press OK"). |
Populate variable with result |
Text |
Yes |
(Empty) |
RESULTVARIABLE="varname" |
The name of an already created variable that should be populated with the folder selected by the user. |
Advanced Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Initial folder |
Text |
No |
(Empty) |
DEFAULTFOLDER="c:\foldername\" |
The starting (highlighted) folder that the user sees when the dialog box appears. |
On cancel |
Text (Options) |
No |
Stop |
|
Specifies how this activity should react if the user presses the Cancel button. The available options are:
|
Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.
Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)
On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)
Example
The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.
Description: This sample task displays a 'Browse to Folder' dialog prompting selection of a folder. The path and folder name of the selected folder is then displayed in a message box.
<AMVARIABLE NAME="theFolder"></AMVARIABLE> <AMSHOWDIALOG ACTIVITY="folder" WINDOWTITLE="Please select a folder" RESULTVARIABLE="theFolder" DEFAULTFOLDER="C:\" /> <AMSHOWDIALOG WINDOWTITLE="FOLDER SELECTED" COUNTDOWNDELAY="20">The folder selected is %theFolder%.</AMSHOWDIALOG> |