Dialog (data input and output)


This step allows for the interaction of tasks with the user, displays the informational messages or dialog boxes to enter information or select one option from several available.

The basic techniques on working with the dialog are shown in the article "Dialogs: information input and output".

MouseRobot dialog box can contain multi-line text commentary, as well as arbitrary number of fields to enter information, and buttons. In this case, one button can be noted as a confirmation button (when you click on it the values entered in the field will be stored in the relevant variables), and one as the cancel button (when you click on it the entered values will be ignored, the values of variables do not change). For convenience, the confirmation and cancel buttons work when you press Enter, and Esc, respectively.

Designating properties to dialog elements (fields and buttons) is shown in the table.

Setting

Value

Field

Button

Type

text, file, directory, number or list

+

 

Field caption

visible when displaying the dialogue signature and name of the button

+

+

ID

unique identifier for an item in the dialogue serves to distinguish between elements within the dialogue and appeals to their values and follow the dialog checks

+

+

Variable

variable name, which will remain the field value at the close dialogue with the confirmation. Apart from the variable value field can be obtained through the function {LastDialogField (FIELD_ID)}

+

 

Default value

the initial value or set of values of the field, by default - empty

+

 

Field properties can be specified when you add it, or later by selecting it in the "Dialog fields and buttons" and clicking "Edit". Editing Field Properties dialog is shown in the figure below:

MouseRobot supports the following types of fields:

Field

Description

Text

Allows you to enter one line of text

Integer

Integer value: 1, 2, 3, 0, -5, ...

Number

Arbitrary number: 1.25, -2.7, 0, 5, 10, ...

File

Filename, such as "C:\Windows\Notepad.exe"

Directory

Directory name, eg "C: \ Documents"

Check box

The switch can be marked and dumped state

Time

Allows you to enter the time

List

A simple list, you can select one of the elements

List with checkboxes

List with checkboxes allows you to mark multiple items

Dropdown list

Drop-down list items are displayed when you click on it. More compact than the usual list or a list with checkboxes.

Hotkey

Input field keyboard shortcuts

The default value for the fields, the list is given with the built-in functions of MouseRobot, such as {Range}, {StringList}, {VisibleChildControlList} and others, intended to generate lists of items.

The appearance of the fields:

When you close the dialog, the ID of the pressed key is stored in the variable {LastDialogResult}, and the values entered in the field can be obtained by the variables or by the function {LastDialogField (ID_FIELD)}.