Scripts
14 commands. Toolkit id ooa.script.
| Command | What it does |
|---|---|
| Call function in session | Call a function defined in an open script session with arguments, and return what it returns (G4). |
| Close script session | End a script session and its program (G4); sessions also end with the run. |
| Last script step succeeded | True when the last script step succeeded: in this session, or (session empty) the last script step of the run (G4). |
| Open script session | Start Python, JavaScript (Node.js) or VBScript and keep it running for the steps after it: what one step defines is there for the next (G4). |
| Run code in session | Run code, or a file, in an open script session; the value of a last expression (Python, JavaScript) or of the code (VBScript Eval, when run_as is eval) comes back (G4). |
| Run JavaScript | Run JavaScript with Node.js, or with Windows' built-in JScript when Node.js is not installed. |
| Run JavaScript function | Call one function in a JavaScript file with Node.js (or Windows' built-in JScript when Node.js is not installed), passing JSON-compatible arguments, and return what it returns (promises are awaited with Node.js). |
| Run PowerShell | Run a PowerShell script (PowerShell 7 if installed, otherwise Windows PowerShell). |
| Run Python | Run a Python 3 script. |
| Run Python function | Call one function in a Python file with JSON-compatible arguments and return what it returns. |
| Run VBScript | Run a VBScript with Windows Script Host (Windows only). |
| Run VBScript function | Call one function in a VBScript file and return its result as text (Windows only). |
| Script session is open | True when the script session is open and its program still runs (G4). |
| Script succeeded | Run a PowerShell, Python, JavaScript or VBScript script and be true when it ends without an error (exit code 0). |