home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / uedit-stuff_429.lzh / Uedit-Stuff / Ue-load.rexx < prev   
OS/2 REXX Batch file  |  1991-01-10  |  1KB  |  48 lines

  1. /* See U.DOC for description of this file UE-LOAD.REXX and the script U. */
  2.  
  3. parse arg opts "/: " filez " /::"
  4.  
  5. ceedee = pos("c", opts) > 0
  6. readonly = pos("r", opts) > 0
  7. frontit = 1
  8. curd = ""
  9.  
  10. if ~show('l','rexxsupport.library') then
  11.     if ~addlib('rexxsupport.library',0,-30) then do
  12.         say "Can't open rexxsupport!"
  13.         exit 25
  14.     end
  15.  
  16. if ~ show('Ports', 'URexx') then do
  17.     say 'Starting Uedit...'
  18.     address command 'RunBack UE'      /* <=- PUT CORRECT PATHNAME THERE ****/
  19.     do while ~show('Ports', 'URexx')
  20.         call delay(20)
  21.     end
  22.     frontit = 0
  23. end; else if ceedee then
  24.     address 'URexx' 'changedir' pragma('D')
  25. else
  26.     curd = pragma('D')
  27.  
  28. do while filez ~== ""
  29.     parse value filez with filename " /: " filez
  30.     if filename ~== "" then do
  31.         if curd ~== "" then do
  32.             i = pos(':', filename)
  33.             if i <= 1 then do
  34.                 if i == 1 then
  35.                     curd1 = left(curd, pos(':', curd) - 1)
  36.                 else if right(curd, 1) ~= ':' & right(curd, 1) ~== '/' then
  37.                     curd1 = curd || '/'
  38.                 else curd1 = curd
  39.                 filename = curd1 || filename
  40.             end
  41.         end
  42.         address 'URexx' 'loadfile' filename
  43.         if readonly then address 'URexx' 'readonly'
  44.     end
  45. end
  46.  
  47. if frontit == 1 then address 'URexx' 'frontscreen'       /* OPTIONAL */
  48.