История страницы
...
Run script command Version 12 (Net)
Группа действийAction group: Процессы Processes
Описание
Исполняет заданную команду в указанном интерпретаторе.
...
Description
Executes the specified command at the specified interpreter.
Action icon
...
Parameters
Входные параметры
Интерпретатор Интерпретатор для выполнения команды.
Команда Команда для выполнения.
Выходные параметры
Завершен успешно Логическая переменная, которая возвращается по завершению процесса.
Таблица Переменная типа Таблица.
Настройки
...
Свойство
...
Англ. наименование
...
Описание
...
Тип
...
Пример заполнения
...
Обязательность заполнения поля
Input parameters
Interpreter - Interpreter to execute the command.
Command - The command to execute.
Output parameters
Completed successfully - A boolean variable that is returned when the workflow completes.
Table - A variable of the Table type.
Settings
Property | Description | Type | Filling example | Mandatory field |
---|---|---|---|---|
Parameters | ||||
Interpreter | Interpreter to execute command | Robin.String | Yes | |
Command | Command to be executed | Robin.String | Yes | |
Results | ||||
Completed successfully | A boolean variable that is returned at the end of the process. True - the script was executed successfully, false - not successful | Robin.Boolean | true | |
Table | A variable of the Table type, where the result is written in the Output column, the Error column contains an error that occurred during the operation of the action, and the ExitCode column contains the number 0 or 1, where 0 - the script was executed successfully, 1 - not successful. | Robin.DataTable |
Special conditions of use
The result of script execution is written to two variables:
- Variable of Boolean type, where true - the script is executed successfully, false - not successfully
- A variable of the Table type, where in the Output column the result is recorded, in the Error column the error that occurred in progress of the action, and in the ExitCode column the number 0 or 1, where 0 - the script was executed successfully, 1 - not successfully.
Example of use
Task
Execute the HELP command - Windows command line help call, get the result into a CSV table.
Solution
Use
...
Интерпретатор для выполнения команды.
Выпадающий список:
- PowerShell
- CommandLine
Строка
...
PowerShell
...
Логическая переменная, которая возвращается по завершению процесса.
true - скрипт выполнен успешно, false- не успешно
...
Переменная типа Таблица.
Имена столбцов:
- Output
- Error
- ExitCode
...
Особые условия использования
Результат исполнения скрипта записывается в две переменные:
- Переменная Логического типа, где true - скрипт выполнен успешно, false - не успешно
- Переменная типа Таблица, где в столбце Output записывается результат, в столбце Error ошибка, которая возникла в ходе работы действия, а в столбце ExitCode число 0 или 1, где 0 - скрипт выполнен успешно, 1 - не успешно.
Пример использования
Задача
Исполнить команду HELP - вызов справки командной строки Windows, результат получить в таблицу CSV.
Решение
Воспользоваться действиями "Run script command", "Table to CSV" actions.
Реализация
Implementation
- Assemble a robot scheme consisting of actionsСобрать схему робота, состоящую из действий:
- Настроить параметры для действия "Исполнить команду"Set the parameters for the "Run script command" action.
Настроить параметры для действия "Сохранить - таблицу в Set the parameters for the "Table to CSV" action.
- Нажать на кнопку "Старт" в верхней панелиClick on the "Start" button in the top panel.
Результат
Result
The program robot completed successfullyПрограммный робот отработал успешно.
Сформирована
таблица в формате CSV с колонкамиGenerated a table in CSV format with columns:
- Output
- Error
- ExitCode