* ===============================================================
* MSGBOX -- Demonstrates the use of the Message Box macro
*           to display a Windows Message Box.                     
*
* ===============================================================
   
   EQU MAGIC TO CHAR( 127 )
   
*  Message Box Types
   
   EQU MBOK               TO 0
   EQU MBOKCANCEL         TO 1
   EQU MBABORTRETRYIGNORE TO 2 
   EQU MBYESNOCANCEL      TO 3 
   EQU MBYESNO            TO 4 
   EQU MBRETRYCANCEL      TO 5 
   EQU MBICONHAND         TO 16
   EQU MBICONQUESTION     TO 32
   EQU MBICONEXCLAMATION  TO 48
   EQU MBICONASTERISK     TO 64
   EQU SENDCR             TO 128   
   
* Message Box Return Codes
   EQU OK     TO 1
   EQU CANCEL TO 2
   EQU ABORT  TO 3
   EQU RETRY  TO 4
   EQU IGNORE TO 5
   EQU YES    TO 6
   EQU NO     TO 7
   
   
   
*  Start the script macro for the Message Box
   
   PRINT MAGIC:"UWSCRIPTsdk/mbox.scr":MAGIC
   
*  Send the message box type and the title
   
   PRINT MBYESNOCANCEL + MBICONASTERISK: ",Sample Title,"


*  Send the body of the message box.  The ^M will create
*  a line break.
   
   PRINT "This is a sample message box using text from ^M"
   PRINT "the host application. ^M"
   PRINT  "^M"
   PRINT "Please enter your selection."
   
*  End the macro   
   PRINT MAGIC:
   

*  Wait for the user to select a button and display the result   
   PRINT 
   CHOICE = KEYIN( )
   
   PRINT "User selected: ":
   
   IF CHOICE = OK THEN PRINT "OK"
   IF CHOICE = CANCEL THEN PRINT "Cancel"
   IF CHOICE = ABORT THEN PRINT "Abort"
   IF CHOICE = RETRY THEN PRINT "Retry"
   IF CHOICE = IGNORE THEN PRINT "Ignore"
   IF CHOICE = YES THEN PRINT "Yes"
   IF CHOICE = NO THEN PRINT "No"
   

END
