|
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.
Parameters
General
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 (for example, "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
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:
|
Example
- The sample AML code below can be copied and pasted directly into the Steps Panel of the Task Builder.
- Parameters containing user credentials, files, file paths, and/or other information specific to the task must be customized before the sample code can run successfully.
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>