Dialogs: information 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 of data entry and random set of buttons. For this use the step "Dialog (input and display 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.

Example:

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  let us display the following dialog:

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

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

Enter a text line, number, file name or directory

Dialogue MouseRobot 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")}

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".

Example

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

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:

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.

Here is an example of the appearance of the display dialogue.