Command Reference : Function Reference : Function Reference: U
  
 
@uiprompt
 
Display prompt dialog.
Syntax: @uiprompt(msg[, button, beep])
msg: string
button: string
beep: string
Return: integer
Displays a prompt dialog with OK, Cancel, or Yes and No buttons. You must specify a message string for the prompt dialog, and optionally the type of icon and buttons the dialog should display. You may also instruct the message box to issue a beep when displayed.
The dialog will return an integer representing the button clicked: Cancel (-1), OK (0), Yes (1), or No (2).
button_type can be one of the following keywords:
 
“O”
Exclamation icon with OK button (default).
“OC”
Exclamation icon with OK and Cancel buttons.
“YN”
Question icon with Yes and No buttons.
“YNC”
Question icon with Yes, No, and Cancel buttons.
beep_type can be one of the following keywords. The keywords change the type of beep that is omitted, where those beeps are defined by the Windows operating system definitions. If beep_type is omitted, no beep will be issued.
 
“B”
Base type of beep on button_type
“AB”
Asterisk beep
“CB”
Critical stop / error beep
“QB”
Question beep
“EB”
Exclamation beep
“DB”
Default beep
Examples
@uiprompt("Error: Too many observations")
Displays a dialog with the message “Error: Too many observations” and the OK button.
@uiprompt("Exceeded count. Would you like to continue?", "YNC")
Displays a dialog with the error message “Exceeded count. Would you like to continue?” and the YES, NO, and CANCEL buttons. If the user presses the YES button, the dialog will return the value 1.
Cross-references
See “User-Defined Dialogs” for discussion.
See also @uidialog, @uilist, @uiedit, @uiradio.