Automating data input and output

MouseRobot is able to interact with the user during the processing of the task, by displaying a fully customizable dialog window containing a title, text description, one or more fields for data entry and any number of buttons.

For this use the step "Dialog (input and display data)".

Dialog (input and output data)

Pausing or selecting option of execution

It is often necessary to pause task execution at a given step to enable the user to execute an operation manually, or to identify further direction. To do this you can add the display of the dialog box with options for operation in the form of buttons to the task.


Let us consider the example when, after the automatic changes in the document, MouseRobot should seek further actions: close the program without saving your changes, save changes and exit, or stop the task and leave the program open.

To choose further action the following dialog can be used:

Choice sample

To do this add the "Dialog" step or "Dialog with condition" snippet to the task, and set the following parameters

Choise settings

To process the choice, add two "Condition(if..else)" sub-steps immediately after the step "Dialog", and adjust them as follows:

Choice dialog steps

Data input: a text line, number, file name or directory

MouseRobot Dialog may contain one or more fields for data entry of different types - text, numbers, names of files and directories and others. When you add a field, you should specify its name, unique identifier (ID), which yields the field value, a variable, which will store the field value and the "Default value".

In the next steps, the field value can be obtained:

  • through the specified variable. For example, {name} (MouseRobot variables are indicated in braces)
  • using the {LastDialogField ("idField1")}

Dialog fields editing

To make MouseRobot remember the fields the user must press any button except the button ID, which is specified in the "Cancel button". While pressing the "Cancel button" or Esc, the field values are not defined.

Selecting one or more options from the list

To display a list of values and process the results you need to use the built-in functions, such as {Range}, {StringList}, {FileList}, etc. You can look for more information on available options and their use in the section "Built-in variables and functions".

Dialog fields editing


Processing of Microsoft Word documents in the "My Documents" folder.

Dialog sample

The displayed dialog has two fields:

  • list of operations
  • list of Microsoft Word documents in the folder "My Documents"

Parameters of the "Select an action" field:

Select an Action field settings

Parameters of the "Select documents" field. Note, that the path to "My Documents" folder is defined by the built-in variable {UserDocumentsDirectory}. Likewise, it is desirable to identify other standard catalogs of Windows, as the task will run unchanged on any other computer.

Select Documents field settings

Example of the appearance of the dialogue:


© AutomationBox 2005-2011