TEXTBOX

Purpose: Displays a dialog box with text from a file.

Format:    TEXTBOX    type   variable     filename    <title>

Notes:      The  TEXTBOX  statement will display a message box with the text from the  filename  file and suspend program execution until the user clicks on a button.  If the  OKSTAY  type is specified then program execution continues and the message box stays until the user clicks  OK.  The results of the user button click is placed in  variable.  The title  text is displayed in the caption area and is optional.
 
 

Dialog Box Types
Type Buttons Displayed
YN Yes, No
YNC Yes, No, Cancel
OK OK, Cancel
OKSTAY OK

 
Button Results
variable Button Pressed
  0
No
  1
Yes
 -1
Cancel

Example:

# define button status values
yes = 1
no = 0
cancel -1

textbox ync button $textfile “TextBox Example”

if button = yes
 print “You hit YES”
endif

if button = no
 print “You hit NO”
endif

if button = cancel
 print “You hit Cancel, exit script.”
 exit
endif

print “Program continues…”

exit

See Also:  PAUSE