WintextCom Utilities > The Request Information Utility > Presenting a Message Box  >

Message Box Return Values

Last updated: 09/11/2008 15:20:10 GMT
Print (Alt+1) Previous (Alt+P) Beginning of ChapterNext (Alt+N)

If wtreqinfo is unable to display a message box due to a system error, the value returned as the errorlevel to the calling program or script is 256. Otherwise, the errorlevel when the box is closed and wtreqinfo returns is the ASCII value of the first letter of the selected button, except in the following two cases.

  1. The Cancel button is selected or ESC pressed: The returned errorlevel is 27.
  2. The OK button is selected: Errorlevel 13 is returned. Note that 13 is also returned if ESC is pressed in a message box containing only an OK button.

 

A button is selected either with the mouse or the ENTER key.

 

The complete list of errorlevels is shown below.

 

Pressing Alt+F4 to close the message box is equivalent to pressing ESC, returning 27 as the errorlevel, or 13 if the message box only has an OK button.

 


Page url: http://wtcmanual.wintextware.com/index.html?wtri_message_box_return_values.htm