MessageBox

Item Description

Use with:

Startup scripts, Terminal Launcher, Web, and Windows

SecureLogin version:

All

Type:

Action

Usage:

MessageBox [-yesno flag] [-yesnocancel flag] [-background] ?variable ["-defaultno"] data

Arguments:

[-yesno]


[-yesnocancel]


[-background]

?variable

[-defaultno]


data

Allows the user to select either Yes or No within the message box rather than being limited only to an OK button.

Allows the user to select either Yes, No, or Cancel when a message box is presented.

When specified, -background allows the user to open an application and work in that application, without responding to the MessageBox.

If this parameter is not used, the MessageBox remains the topmost window and the user must respond to the MessageBox before continuing with any other work.

This runtime variable is required with the -yesno or -yesnocancel flag to produce a result for the -yesno or -yesnocancel flag. It is only used with the -yesno or -yesnocancel flag.

An optional parameter, used only with the -yesno flag. When the -defaultno parameter is set, default focus goes to the No button instead of to the Yes button.

The text to be displayed to the user.

Description:

Displays a dialog box that contains the text specified in the data variable. The script is suspended until the user reacts to this message. As the following line illustrates, MessageBox can take any number of text arguments, including variables:

MessageBox "The User "$Username" has just been logged into the system"

The -yesno flag can be set when calling a MessageBox. If this flag is set, the MessageBox prompts the user with a box that has a Yes and a No button rather then an OK button.

You can capture the result of the MessageBox immediately after the flag by using a runtime ?variable. The following example sets the value of ?result to Yes if the user clicked Yes or to No if the user clicked No.

Syntax examples:

MessageBox "Script completed successfully"
MessageBox "Do you want to continue?" -yesno ?Result
MessageBox "Do you want to continue?" -yesnocancel -background -defaultno ?Result

Example:

Dialog  
 Title "Login"
 Ctrl #1
EndDialog
Type $Username #1
Type $Password #2
Click #1
MessageBox "Script completed successfully"