home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / comm / spot-1.3.lha / Spot / Rexx / UUWrite.spot < prev    next >
Text File  |  1993-08-25  |  794b  |  32 lines

  1. /* UUWrite (written by Francois Helsen/Marc Duponcheel)  */
  2. /* Install as 'UUWrite...' in the ARexx menu.            */
  3. /* $VER: UUEncode.spot 1.03 (28.6.93)                    */
  4.  
  5. address spot
  6. options results
  7.  
  8. 'isarealist'
  9. if rc = 0 then do
  10.     'requestnotify "Use in message list or from message window!"'
  11.     exit
  12.     end
  13.  
  14. 'requestfile TITLE "File to UUEncode"'
  15.  
  16. filename = result
  17.  
  18. if rc ~= 5 then do
  19.     filepart = fp(filename)
  20.     address command
  21.     UUEncode '>T:CodeFile' '"' || filename || '"' '"' || filepart || '"'
  22.     address spot 'write FILE T:CodeFile'
  23.     'Delete >NIL: T:CodeFile'
  24.     end
  25.  
  26. exit /* done here ... */
  27.  
  28. /* given a filename, return the filepart */
  29. fp:
  30.  parse arg filename
  31.  return right(filename, length(filename) - max(lastpos("/", filename),lastpos(":", filename)))
  32.