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

  1. /* Let's make a window and associate the .HLP file 'test.hlp' (created
  2.     with OS/2's Information Presentation Facility Compiler, IFPC) with
  3.     that window.  Then, when the user clicks upon the OK button. We'll
  4.     display a panel named TEST.
  5. */
  6.  
  7. /* Trap ERROR and FAILURE */
  8. SIGNAL ON ERROR
  9. SIGNAL ON FAILURE
  10.  
  11. /* ====================== 'Main Window' ======================= */
  12. RXTYPE.1 = 'RESULT'
  13.  
  14. /* Return a 1 for OK, YES, RETRY, ENTER, etc. Return a 1 for
  15.     CANCEL, NO, IGNORE, etc. No need to set 'END' since
  16.     RESULTBUTTON group always causes RXDLG to return */
  17. RXFLAGS.1 = 'BOOL'
  18.  
  19. /* No groupbox */
  20. RXLABEL.1 = ' '
  21.  
  22. /* Give me "Ok" */
  23. RXINFO.1 = '2'
  24.  
  25. /* RXVAL is Irrelevant for RESULTBUTTON */
  26.  
  27. /* Position */
  28. RXX.1 = 10
  29. RXY.1 = 10
  30.  
  31. /* Default size and position (also gives us sizing and max button) */
  32. RXWINMAIN = ' '
  33. RXDLG 1 '"Main Window"' 'RXWINMAIN' 'RESULT|NOCLOSE'
  34.  
  35. /* Associate the help file */
  36. RXHELP 'CREATE' '""' 'TEST.HLP'
  37.  
  38. /* ============= Message loop on the dialog windows ============ */
  39. more:
  40.    /* Do user interaction. We sleep now */
  41.    RXDLG
  42.  
  43.    /* Did user press ESC or CLOSE the window? */
  44.    IF RXID < 0 THEN DO
  45.        EXIT
  46.    END
  47.  
  48.    /* Display panel named TEST. Note that, in TEST.IPF, we gave the panel
  49.        a number of 1000, so RXHELP 1000 would also work here */
  50.    RXHELP 'TEST'
  51.  
  52.    SIGNAL more
  53.  
  54. /* =================================================== */
  55.  
  56. FAILURE:
  57.     /* NOTE: the variable RC contains the returned error message (not a number,
  58.     unless we use RXERR to set up Rexx Dialog to return error numbers instead).
  59.     Because we used the default severity level, Rexx Dialog has already displayed
  60.     this error message to the enduser */
  61.     EXIT
  62. ERROR:
  63.     /* NOTE: the variable RC contains the returned error message (not a number,
  64.     unless we use RXERR to set up Rexx Dialog to return error numbers instead).
  65.     Because we used the default severity level, Rexx Dialog has already displayed
  66.     this error message to the enduser */
  67.     EXIT
  68.