Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Run script command Version 12 (Net)

Группа действийAction group: Процессы Processes

Описание

Исполняет заданную команду в указанном интерпретаторе.  

Иконка

Image Removed

Параметры

Входные параметры  

Интерпретатор         Интерпретатор для выполнения команды.

Команда                    Команда для выполнения.

Выходные параметры

Завершен успешно Логическая переменная, которая возвращается по завершению процесса.

Таблица Переменная типа Таблица.

Настройки

...

Свойство

...

Англ. наименование

...

Описание

...

Тип

...

Пример заполнения

...

Обязательность заполнения поля

...

Интерпретатор для выполнения команды.

Выпадающий список:

  • PowerShell
  • CommandLine

Строка

...

PowerShell

...

Логическая переменная, которая возвращается по завершению процесса.

true - скрипт выполнен успешно, false- не успешно

...

Переменная типа Таблица.

Имена столбцов:

  • Output
  • Error
  • ExitCode

...

Особые условия использования

Результат исполнения скрипта записывается в две переменные:

  1. Переменная Логического типа, где true - скрипт выполнен успешно, false - не успешно
  2. Переменная типа Таблица, где в столбце Output записывается результат, в столбце Error ошибка, которая возникла в ходе работы действия, а в столбце ExitCode число 0 или 1, где 0 - скрипт выполнен успешно, 1 - не успешно.

Пример использования 

Задача

Исполнить команду HELP - вызов справки командной строки Windows, результат получить в таблицу CSV.

Решение

Воспользоваться действиями "Исполнить команду", "Сохранить таблицу в CSV". 

Реализация

...

Description

Executes the specified command at the specified interpreter.  

Action icon

Image Added

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

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
InterpreterInterpreter to execute commandRobin.String
Yes
CommandCommand to be executedRobin.String
Yes
Results
Completed successfullyA boolean variable that is returned at the end of the process. True - the script was executed successfully, false - not successfulRobin.Booleantrue
TableA 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:

  1. Variable of Boolean type, where true - the script is executed successfully, false - not successfully
  2. 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 "Run script command", "Table to CSV" actions. 

Implementation

  1. Assemble a robot scheme consisting of actions:
    Image Added

  2. Set the parameters for the "Run script command" action. 
    Image Added

  3. Set the parameters for the "Table to CSV" action. 
    Image Added

  4. Click on the "Start" button in the top panel. 

Result

The program robot completed successfully. 

Image Added

Generated a table in CSV format with columns

Результат

Программный робот отработал успешно. 

Image Removed

Сформирована таблица в формате CSV с колонками:

  • Output
  • Error
  • ExitCode

Image RemovedImage Added