home *** CD-ROM | disk | FTP | other *** search
- /*
- ** GetABool
- **
- ** $VER: GetABool 1.1.0 (5.11.93)
- **
- ** This ARexx script contains a function which asks the user to make
- ** a choice between two values.
- **
- ** INPUTS
- ** Title -- text shown to the user asking for a choice.
- ** TRUEText -- text for the Ok button.
- ** FALSEText -- text for the Cancel button.
- **
- ** RETURN
- ** EnteredChoice -- the entered choice.
- **
- ** This script should work with current versions of ARexx.
- **
- ** Copyright © 1992-1993 ASDG, Incorporated
- ** All Rights Reserved
- */
-
-
- ADDRESS "ADPro"
- OPTIONS RESULTS
-
- NL = '0A'X
- SQ = '27'X
- DQ = '22'X
- TRUE = 1
- FALSE = 0
-
- PARSE ARG Arguments
- PARSE VAR Arguments '"'Title'"' '"'TRUEText'"' '"'FALSEText'"'
-
- Title = DQ || Title || NL || NL ||,
- "Select OK " || TRUEText || NL ||,
- "or Cancel " || FALSEText || "." || DQ
-
- ADPRO_TO_FRONT
-
- OKAY2 Title
-
- /*
- IF (RC ~= 0) THEN
- EnteredChoice = TRUE
- ELSE
- EnteredChoice = FALSE
- */
- EnteredChoice = RC
-
- SCREEN_TO_FRONT "FRED"
-
- RETURN EnteredChoice
-
- EXIT 0
-