home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / Converter / AD2.55-C.DMS / in.adf / FREDScripts.lha / FREDFunctions / GetABool < prev    next >
Encoding:
Text File  |  1994-01-31  |  958 b   |  57 lines

  1. /*
  2. ** GetABool
  3. **
  4. ** $VER: GetABool 1.1.0 (5.11.93)
  5. **
  6. ** This ARexx script contains a function which asks the user to make
  7. ** a choice between two values.
  8. **
  9. ** INPUTS
  10. **    Title -- text shown to the user asking for a choice.
  11. **    TRUEText -- text for the Ok button.
  12. **    FALSEText -- text for the Cancel button.
  13. **
  14. ** RETURN
  15. **    EnteredChoice -- the entered choice.
  16. **
  17. ** This script should work with current versions of ARexx.
  18. **
  19. ** Copyright © 1992-1993 ASDG, Incorporated
  20. ** All Rights Reserved
  21. */
  22.  
  23.  
  24. ADDRESS "ADPro"
  25. OPTIONS RESULTS
  26.  
  27. NL = '0A'X
  28. SQ = '27'X
  29. DQ = '22'X
  30. TRUE  = 1
  31. FALSE = 0
  32.  
  33. PARSE ARG Arguments
  34. PARSE VAR Arguments '"'Title'"' '"'TRUEText'"' '"'FALSEText'"'
  35.  
  36. Title = DQ || Title || NL || NL ||,
  37.     "Select OK " || TRUEText || NL ||,
  38.     "or Cancel " || FALSEText || "." || DQ
  39.  
  40. ADPRO_TO_FRONT
  41.  
  42. OKAY2 Title
  43.  
  44. /*
  45. IF (RC ~= 0) THEN
  46.     EnteredChoice = TRUE
  47. ELSE
  48.     EnteredChoice = FALSE
  49. */
  50. EnteredChoice = RC
  51.  
  52. SCREEN_TO_FRONT "FRED"
  53.  
  54. RETURN EnteredChoice
  55.  
  56. EXIT 0
  57.