Example 1: To prompt user for the Start and End date and generate a sales
report between these dates.
- Select 'Don't Write In Any Window' from the drop down list.
- Type in the message that you want to prompt the user with to get the Start date.
- Assign the value that user enters to a variable by selecting the variable from the variable list.
- Similarly assign the 'End' date entered by the user to another variable.
- You can use these two variables in place for the start and end dates in your task that
generates the sales report.
- When the task runs these two variables will be assigned the values that
user enters.
Example 2: Create a task that prompts the user for user data and automates the installation
of an application.
- Click on 'Record' button in Automation Anywhere and
automate the installation of your application.
- If you plan to run this task on different computers with different
resolutions, then we suggest to use the keyboard as compared to mouse during
the recording process.
- Once you are done with the recording and saving the task, select it and
click on 'Edit'.
- Identify your keystroke actions like the actions where you entered the
Installation folder etc.
- Select the action and Right-click (OR click on 'Actions' button) and select 'Convert to Prompt'
- This will convert your recorded keystrokes into Prompt command and it will
prompt the user for values when the task runs.
- This way you can make a generic task to automate your application and not
depend on the values that you entered while recording.

Example 3: Prompt
for a file which is further used in a loop to enter
data.
- Open the Task Editor from Tools -> Task Editor
- Double click on the 'Prompt for file'
- Enter the desired caption.
- Enter the custom message for the user to feed in the file.
- Assign the value to a list variable from the list.
- Expand the 'Loop' command and double click on List'.
- Select the list variable which you assigned to the file.
- Double click on 'Insert Keystrokes' command.
- Select the window tile from the list of the file in which data is to be
entered.
- Type your data which you want to insert in to the file.
- Click on 'Save' button.
Note: This is a procedure for a single file. You can do the same for multiple
files. You will just have to check on 'Enable this task to run with similar
window titles/files' under 'General Tab' under 'Properties' menu.
Example 4: Prompt
for the folder which contains the setup files
(setup.exe).
- Open the Task Editor from Tools -> Task Editor
- Double click on the 'Prompt for folder'
- Enter the desired caption.
- Enter the custom message for the user to select the folder.
- Assign the value to a value variable from the list.
- Click 'Save' button.
- Double click on 'Open Program/File'.
- Insert the variable to which the value of the folder was assigned followed
by '\setup.exe' in the Program/File path.
- Click 'Save' button.
Example 5: Prompt the
user for confirmation before deleting a record from a
database.
- Open the Task Editor from Tools -> Task Editor
- Insert the command to connect to the desired
database.
- Double click on the 'Prompt for Yes/No'
- Enter the desired caption.
- Enter the custom message for the user to select the desired
option (Yes/No).
- Assign the value to a value variable from the
list.
- Click 'Save' button.
- Double click on
- Insert an ''If - Variable' condition to check the whether the variable to which the value has been
assigned (Step 6) has the value
'Yes'.
- Click 'Save' button.
- Double click the 'Database->Insert/Update/Delete' command and specify
the delete statement to delete a record from a particular table.
- Click 'Save' button.
- Insert the variable to which the value of the folder
was assigned followed by '\setup.exe' in the Program/File path.
-
Double click the 'Database->Disconnect' command.
- Click 'Save' button.