Equinox Online Help - Language Reference - A to Z

Home

Alert

Applies to
SyntaxAlert Message1Expression [, Message2Expression , Message3Expression , Message4Expression]
Action[Statement] Creates a dialog and displays the specified text lines on it.
ScopeUsable anywhere.
NotesA dialog appears displaying the text messages supplied as arguments. By default the dialog has one button, marked OK. The buttons may be changed using the AlertButtons statement (a total of four buttons may be included). The system workarea SysReply is set by the user's response to the dialog. SysReply may take the following values:
  • 1 Selected button #1
  • 2 Selected button #2
  • 3 Selected button #3
  • 4 Selected button #4
  • -1 Pressed the Escape key
  • -2 No response (timeout error)
  • -3 An undefined error occurred
CategoryUser dialogs
See Also AlertBitmaps, AlertButtons, Beep, Edit, HelpAbout, Input, InputPassword, Message, PopupColour_PopupColor, PopupFlags, PopupFont, PopupJustification, PopupSize, PopupTitle, StatusLine
ExampleThis simple example displays a message box, to indicate to the developer that the method has reached a certain point. Alert "debug: calculating percentage" A message box can also be used to pass information to the user. This next example tells the user to correct a data item that they have just entered. Alert "You must enter something in this field","eg A453" This final method detects when the percentage variable has reached more than 100 (an error) and uses the Alert statement to inform the user. The AlertButtons statement provides three buttons for the user to press. | Check For calculation error If percentage > 100 Then AlertButtons "Zeroise", "Continue", "Halt" | the \ is used To Continue statement on the Next line Alert "percentage error(" & percentage & ") ",\ "What do you want To do ?" Switch SysReply Case 1 percentage = 0 Case 2 percentage = 100 Default Exit Module End Switch End If N.B. If you add the text 9999 to an alert dialog, Equinox will substitute the value of SysTimeout and then process it as a count down timer e.g. Alert "This message will self distruct in : 9999"