Arbortext Command Language > Functions by Alphabetical Listing > response
  
response
response (s1[, s2,...])
This function displays the message specified by s1 in a panel with push buttons labeled by the following strings (s2, s3, and so on). This function returns the ordinal number of the button pressed by the user. If the dialog box is dismissed without a button press (by a window manager function, for example), this function returns 0. However, if button two or three is Cancel, the function returns the ordinal number of the Cancel button. The prompt message may contain newline characters. If no button arguments are given, then an OK button is supplied. In this case, the response function displays the message and does not execute the next command until the user presses the OK button.
If the response function panel has just one push button, or if any button is labeled OK or Yes, the ENTER key works as an accelerator to activate the selection and dismiss the panel. The ESCAPE key is an accelerator for the cancel action if the response function panel has a button labeled Cancel or No.
To establish a mnemonic (hot key) for a particular dialog box item, precede the mnemonic letter with the '&' character in the associated string. Use “&&” anyplace you want a single '&' to show.
Example
response("Choose direction", "&Forward", "&Backward", "&Stop"
Related Topics
list_response function
readvar command
Predefined variables