home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxdlg11.zip / rexxset4.cmd < prev    next >
OS/2 REXX Batch file  |  1995-03-01  |  2KB  |  66 lines

  1. /* This creates a Main Window with a Group of 1 SPIN with the
  2.    END flag set.  Whenever the user changes the SPIN's value, RXDLG
  3.    returns, and we force the value of the SPIN to 129.
  4. */
  5.  
  6. /* Trap ERROR and FAILURE */
  7. SIGNAL ON ERROR
  8. SIGNAL ON FAILURE
  9.  
  10. /* =============== Create "Main Window" ================= */
  11. /* First Group is SPIN */
  12. RXTYPE.1 = 'SPIN'
  13.  
  14. /* Use of a control in this group causes RXDLG to return */
  15. RXFLAGS.1 = 'END|VALUE'
  16.  
  17. /* Label for control. No Groupbox */
  18. RXLABEL.1 = '200 40 Move:'
  19.  
  20. /* TotalControls, ControlsPerLine, WidthOfControls */
  21. RXINFO.1 = '1 1 70'
  22.  
  23. /* initial value of spin */
  24. RXVAL.1 = '64'
  25.  
  26. /* Position */
  27. RXX.1 = 70
  28. RXY.1 = 10
  29.  
  30. /* Default size and position (also gives us sizing and max button) */
  31. RXWIN1 = ''
  32.  
  33. /* NOCLOSE since we want to close the window ourselves.
  34.     No RESULT Flag, so the ESC and ENTER keys do nothing, and we don't
  35.     have to bother checking for those */
  36. RXDLG 1 '"Main Window"' 'RXWIN1'  'NOCLOSE'
  37.  
  38. more:
  39.  
  40. /* Do user interaction */
  41. RXDLG
  42.  
  43. /* Did user click upon the CLOSE ICON? If so, then exit */
  44. IF RXID < 0 THEN EXIT
  45.  
  46. /* Since there is only 1 group and 1 control, we know that it caused RXDLG
  47.     to return. Force spin value to 129
  48. */
  49.  
  50. RXSET '""' 1 1 'VAL' 129
  51. SIGNAL more
  52.  
  53. /* ==================================================== */
  54. FAILURE:
  55.     /* NOTE: the variable RC contains the returned error message (not a number,
  56.     unless we use RXERR to set up Rexx Dialog to return error numbers instead).
  57.     Because we used the default severity level, Rexx Dialog has already displayed
  58.     this error message to the enduser */
  59.     EXIT
  60. ERROR:
  61.     /* NOTE: the variable RC contains the returned error message (not a number,
  62.     unless we use RXERR to set up Rexx Dialog to return error numbers instead).
  63.     Because we used the default severity level, Rexx Dialog has already displayed
  64.     this error message to the enduser */
  65.     EXIT
  66.