home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / text / heddley-1.18.lha / Heddley / Archive / hedd_golded_temp.rexx < prev    next >
OS/2 REXX Batch file  |  1994-08-29  |  1KB  |  29 lines

  1. /* .rexx                                                        */
  2.  
  3. OPTIONS RESULTS                             /* enable return codes      */
  4.  
  5. if (LEFT(ADDRESS(), 6) ~= "GOLDED") then    /* not started by GoldEd ?  */
  6.     address 'GOLDED.1'
  7.  
  8. 'LOCK CURRENT'                              /* lock GUI, gain access    */
  9. OPTIONS FAILAT 6                            /* ignore warnings          */
  10. SIGNAL ON SYNTAX                            /* ensure clean exit        */
  11. SIGNAL ON FAILURE                           /* trap Heddley errors      */
  12.  
  13.  
  14. 'UNLOCK'                                  /* VERY important: unlock GUI */
  15. EXIT                                        /* quit this macro          */
  16.  
  17. SYNTAX:                                     /* ARexx error...           */
  18.  
  19. SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) /* report it...          */
  20. UNLOCK                                      /* unlock GUI               */
  21. EXIT                                        /* exit                     */
  22.  
  23. FAILURE:                                    /* Heddley error...         */
  24. ERRV=address().LASTERROR                    /* get name of error var.   */
  25. SAY "Error:" VALUE(ERRV)                    /* report the error         */
  26. ADDRESS GOLDED.1                            /* talk to GoldED           */
  27. UNLOCK                                      /* unlock GUI               */
  28. EXIT                                        /* exit                     */
  29.