Powershell is a powerful scripting and command-line tool for managing your system. You can find more information about the PowerShell script language and the commands description here.
You can use the built-in RoboTaskApp COM object to communicate with RoboTask. For example:
$rt = New-object -ComObject RoboTask.App
write-host RoboTask version: $rt.version
write-host RoboTask object members
$rt | Get-Member
Save and Exit - saves task settings and closes the editor
Cancel - closes the editor without saving
Open - opens the script text from the external text file and places it into the script text editor.
Save as - saves the script text to an external file.
Add var - calls the variable selection window and places the variable call at the current cursor position.
There are two options
|•||Execute inline script - execute the script you have written in the script editor. In this case, you will see the text editor.|
|•||Execute external script - run the script from an external file.|
Check this box if you want to expand RoboTask variables in the script body before running the script. With variables, you can create dynamic text depending on different conditions.
In "Execute inline script" mode, it is a script text editor.
In "Execute External script" mode, it is a field to enter the file name and a file selection button.
Assign exit code to a variable
Enter the variable name to save the script exit code. By default, the exit code is 0, but it can be changed in the script.
Assign script output to a variable
Enter a variable name in this field to write the script's output text stream to a variable. You will then be able to process this text in your task.
Path to PowerShell - empty by default. This means tan you use system default PowerShell utility. But you can use alternate PowerShell and specify path to it. (for example PWSH.EXE)
Module search paths
Here you can set the search paths to additional cmdlets, script files, or operable program.
RoboTask object for Python
RoboTask object for node.js