User Interface

The user interface object provides functions for interacting with the user, prompting for and displaying basic information. The UI object is made automatically available in your macro as the “ui” variable”.

NOTE:Important! All UI functions require the ‘yield’ keyword in front of them. This allows the macro to block execution until the conditions of the UI function have been met.

[parameter] denotes an optional parameter.

Table 5-35 User Interaction

METHODS

prompt(message,[defaultAnswer], [mask])

Prompt the user for information in the user interface,

Parameters

{String} message title to display to the user. Default: blank String.

{String} defaultAnswer to use if user leaves it blank. Default: blank String

{Boolean} mask indicates whether to hide the prompt (as with a password).

Returns

{Promise} Fulfilled when the user closes the dialog window. Returns the users input on “OK” or null on “Cancel”.

message([message])

Display a message in the user interface.

Parameters

{String} message to display to the user. Default: blank String.

Returns

{Promise} Fulfilled when the user closes the message window.