Opens a dialog box (whose title is dialogTitle) that displays Yes, No, and Cancel buttons and the text string message.

getyesno (message) variable [(dialogTitle)]

  • variable becomes 1 if the user clicks Yes.
  • variable becomes 0 if the user clicks No.
  • variable remains unchanged if the user clicks Cancel. Additionally, a Command Error! is typed to the Script window when Cancel is clicked.



Note on Message File

In addition to entering literal text for message, you can specify $[OMGfileName].Section.Title. This enables you to access a string title in a message file. The OMGfileName extension is assumed to be OMG. If OMGfileName is not specified, the ORIGIN.OMG file is assumed. For an example using this syntax, see the Type command.



This script opens a dialog box that displays the message "Do you want to quit?" with associated Yes, No, and Cancel buttons.

getyesno (Do you want to quit?) MyVar (Stop Requested);