Skip to content

Command Reference

Miriam McMahon edited this page Feb 15, 2023 · 27 revisions

The following table list the various scripting commands with a short description and an example usage.

Command Description
BaseAddress Set the base address for future HTTP requests
ClearCookie Clear a cookie from the cookie storage to eliminate it from future requests
Comment A comment placeholder in the script.
ComparePasswordHash Compare a password hash obtained from a remote system with a hash generated from a password locally.
Condition Runs logic based on evaluation of an expression.
Connect Connect to a remote host.
Disconnect Disconnect from a remote host.
DiscoverSshHostKey Gets the host key of a remote host.
CryptMd5 MD5 encrypt a string
Eval Evaluate/Execute an in-line expression.
ExecuteCommand Execute a command on the remote host
ExtractFormData Extract form inputs from an HTML page
ExtractJsonObject Convert a JSON text string into a JSON object
For Create a for loop.
ForEach Executes a block of commands on each element in a collection of items.
Function Execute a function.
GetCookie Get the value of a cookie
GetFormValue Get the value of a form input from a form object
Headers Add or edit HTTP request headers
HttpAuth Define the authentication method to use with an HTTP request
Log Write a message to the operation debug log.
NewHttpRequest Create a new HTTP request object.
Receive Receive data via SSH or TN3270 from a remote host.
Request Issue an HTTP request.
Return The value to return from a function or operation.
Send Send data via SSH or TN3270 to a remote host.
SetCookie Add or update a cookie
SetItem Create or update a variable and its value.
SetFormValue Set the value of a form input
Split Splits the string contents of a variable or a string into substrings based on the delimiter characters supplied.
Status Publish a progress status message via the framework.
Switch This switch statement allows the contents of a variable to be tested for a match against a list of values. Each value is called a case and the variable being switched on is checked for each case. If defined, the DefaultCase is executed if no match is found.
Throw The throw command logs the associated message and bubbles execution up to a try catch finally block. If the exception is not handled within the script, the code invoking the operation handles it and the operation is considered to have failed.
Try A try block is used to encapsulate commands. If any command throws within that try block, it will be handled by the corresponding catch. The finally block allows contained commands to execute regardless of any throws in the try block.
UrlDecode Convert a URL-encoded string into a decoded string
UrlEncode Convert a text string into a URL-encoded string
Wait Pause execution of the script for the indicated number of seconds.
WriteDiscoveredAccount A mechanism for the script to return account discovery information to the client.
WriteResponseObject A mechanism for the script to return arbitrary data to the client.
WriteDiscoveredSshKey A mechanism for the script to return discovered authorized key information to the client.

Clone this wiki locally