home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / utility / text / htext.lzh / hypertext / Rexx / test.txed < prev   
Encoding:
Text File  |  1990-12-23  |  577 b   |  30 lines

  1. /* this macro will get the current filename from TxEd, tell Txed to
  2.  * save it and then tell HT to load it.
  3.  */
  4.  
  5. /* so we get strings back from TxEd */
  6. options results
  7. 'STATUS D'
  8. dir = result
  9.  
  10. 'STATUS F'
  11. fname = result
  12.  
  13. if dir ~= "" then do    /* need to prepend directory */
  14.   volume = lastpos(':', dir)
  15.   path_sep = lastpos('/', dir)
  16.   if volume > path_sep then
  17.      fname = dir'/'fname
  18.   else
  19.      fname = dir | fname
  20.  end
  21.  
  22. /* this is so we don't get all those AREXX macro error messages in TxEd */
  23. address
  24. call startht.rexx()
  25.  
  26. address
  27. 'SAVEAS' fname
  28.  
  29. address HT LOAD fname
  30.