История страницы
...
Question dialog Version 16 (Net)
Группа действий: Диалоговые окна
Описание
Данное действие предназначено для отображения пользователю в модальном окне вопроса с кнопками для ответа "Да" и "Нет".
Иконка действия
Параметры
Входные параметры
Заголовок окна - Наименование модального окна. Например, “Сохранить документ”.
Вопрос - Текст, который будет содержать модальное окно. Например, “Сохранить документ?”.
Выходные параметры
На выходе получаем логическую переменную, которая будет хранить ответ пользователя на вопрос. Да - true, Нет- false.
Настройки
...
Логическая переменная, которая будет хранить ответ пользователя на вопрос.
Да - true, Нет- false
...
Особые условия использования
Алгоритм работы робота будет продолжен после закрытия модального окна пользователем.
Пример использования
Задача
Вывести на экран диалоговое окно с вопросом к пользователю. Наименование окна - "Сохранить файл". Вопрос - "Сохранить документ?".
Решение
Добавить вопрос.
Реализация
...
Action group: Dialogs
...
Description
This action is designed to display a question to the user in a modal window with "Yes" and "No" answer buttons.
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Question | Question text that will contain the modal window | Robin.String | Yes | |
Window title | Modal window name | Robin.String | No | |
Results | ||||
Result | Logical variable (boolean) that will store the user’s answer (Yes / No) to the question | Robin.Boolean | true |
Special conditions of use
The robot algorithm will continue after the modal window is closed by the user.
Example of use
Task
Display a dialog box with a question to the user. The name of the dialog box is "Save file". Question - "Save document?".
Solution
Add a question.
Implementation
- Create an "Answer" variable with type "Boolean" that will contain the user's answer to the question.
- Open the "Dialogs" action group.
- Move the "Question dialog" action into the Studio workspace and set the action parameters.
- Launch the robot using the "Start" button in the top panel.
- A dialog box appears with choices for answering the question.
- Click the "Yes" button.
- The variable contains the value True after an affirmative response from the user.
Result
The program robot completed successfully, displaying a question to the user in a modal window
Результат
Программный робот отработал успешно, отобразился в модальном окне вопрос пользователю.