3.2.1 Alert


Alert - Pop up an alert window on the local machine. The window can be customized to contain custom buttons and/or editable fields. It can also self-dispose after the specified time out.

The command populates these variables:

Variable NameDescription
_ALERT_BUTTONName of the button that the user selected to close the window
_ALERT_FIELD_<n>Value of the n-th editable text field
_ALERT_FIELD_COUNTNumber of editable fields


Alert <text> [title=<text>]  [buttons=<list>]  [fields=<list>]  [values=<list>]  [timeout=<time_value>]  [location=x:<x_coord>,y:<y_coord>]  [size=w:<width>,h:<height>]
* Red colour indicates obligatory parameters



- The text to display. If it starts with the <html> prefix it will be treated as HTML code.


-  The window title (optional).


- The button label or a semicolon separated list of button names (optional). Name of the selected button is returned in the _ALERT_BUTTON variable. If the parameter is not specified the window will contain a single "OK" button.


- A semicolon separated list of text field names (optional). This allows to design a query requiring the user to enter a value or a set of values.


- A semicolon separated list of values for the text fields specified in "fields" (optional). It should have the same length.


- The window disposal timeout (optional). It must be a time value. If not specified the window will keep displaying until closed by the user.


- Target location on the screen (optional), for example "x:100,y:100". If the location is not specified the window gets centered on the screen.


- The window size (optional), for example "w:300,h:350". If the size is not specified the window will be sized to fit the content.


The command returns number of the selected button where the first button is 1.


Alert "<html><body><center><h1>Login</h1></center>Please enter your credentials:</body></html>" buttons="OK;Cancel" fields="User name;Password"
if ("{_ALERT_BUTTON}" == "OK") {
   Var user="{_ALERT_FIELD_1}"
   Var password="{_ALERT_FIELD_2}"
   // Login code here

- Example of a login window. The alert will look like: