Skip to main content

Scripts

14 commands. Toolkit id ooa.script.

CommandWhat it does
Call function in sessionCall a function defined in an open script session with arguments, and return what it returns (G4).
Close script sessionEnd a script session and its program (G4); sessions also end with the run.
Last script step succeededTrue when the last script step succeeded: in this session, or (session empty) the last script step of the run (G4).
Open script sessionStart 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 sessionRun 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 JavaScriptRun JavaScript with Node.js, or with Windows' built-in JScript when Node.js is not installed.
Run JavaScript functionCall 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 PowerShellRun a PowerShell script (PowerShell 7 if installed, otherwise Windows PowerShell).
Run PythonRun a Python 3 script.
Run Python functionCall one function in a Python file with JSON-compatible arguments and return what it returns.
Run VBScriptRun a VBScript with Windows Script Host (Windows only).
Run VBScript functionCall one function in a VBScript file and return its result as text (Windows only).
Script session is openTrue when the script session is open and its program still runs (G4).
Script succeededRun a PowerShell, Python, JavaScript or VBScript script and be true when it ends without an error (exit code 0).