Lingo Dictionary > A-C > alert

 

alert

Syntax

alert message 

Description

Command; causes a system beep and displays an alert dialog box containing the string specified by message and an OK button. This command is useful for providing error messages of up to 255 characters in your movie.

The message must be a string. If you want to include a number variable in an alert, use the string function to convert the variable to a string.

Example

The following statement produces an alert stating that there is no CD-ROM drive connected:

alert "There is no CD-ROM drive connected."

Example

This statement produces an alert stating that a file was not found:

alert "The file" && QUOTE & filename & QUOTE && "was not found."

See also

string(), alertHook