home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / util / edit / polyed / macros / tutorial / empty.ped < prev    next >
Encoding:
Text File  |  1995-03-13  |  1.4 KB  |  46 lines

  1. /*
  2. ** $VER: empty.rexx 1.0 (23.2.95) written by Robert Brandner
  3. **
  4. ** An empty script, which you may use to write your own scripts
  5. ** easy and safe!
  6. */
  7.  
  8. OPTIONS RESULTS
  9.  
  10. OPTIONS FAILAT 11                           /* ignore warnings          */
  11. SIGNAL ON SYNTAX                            /* ensure clean exit        */
  12. SIGNAL ON FAILURE
  13. SIGNAL ON BREAK_C                            /* no label->syntax->exit    */
  14.  
  15. if (LEFT(ADDRESS(), 6) ~= "POLYED") then do
  16.     if SHOW("Ports", "POLYED.1") then
  17.         address 'POLYED.1'
  18.     else do
  19.         say "PolyEd is not running!"
  20.         exit
  21.     end
  22. end
  23.  
  24. 'LOCKGUI'
  25.  
  26. /*----- begin of custom code area --------------------------------------*/
  27.  
  28. /*      ... insert your code here ...                                   */
  29. /*      ... if you use EXIT within here, you _must_ call ...            */
  30. /*        ... 'UNLOCKGUI' before, or PolyEd will stay locked ...            */
  31.  
  32. /*----- end of custom code area ----------------------------------------*/
  33.  
  34. 'UNLOCKGUI'
  35. EXIT
  36.  
  37. SYNTAX:                                     /* ARexx error...           */
  38.  
  39. say "Error line" SIGL ":" ERRORTEXT(RC)     /* report it...             */
  40. 'UNLOCKGUI'                                 /* Unlock GUI!              */
  41. EXIT                                        /* exit                     */
  42.  
  43. FAILURE:
  44. 'UNLOCKGUI'                                 /* Unlock GUI!              */
  45. EXIT                                        /* exit                     */
  46.