Skip to content

Command Reference

RobertCroteau edited this page Apr 5, 2019 · 27 revisions

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

Command Description
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.
Eval Evaluate/Execute an in-line expression.
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
HttpAuth
Log Write a message to the operation debug log.
Receive Receive data via SSH or TN3270 from a remote host.
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.
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.

Clone this wiki locally