home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / zoc-smod.zip / smodemdl.rx < prev    next >
Text File  |  1997-03-16  |  1KB  |  33 lines

  1. /* Smodem download script for ZOC */
  2. smodemdir = 'smodem'
  3. irq = ''   /* use for non-standard COM settings, ex.: irq = '15') */
  4. addr = ''
  5.  
  6. /* load crap */
  7. call RxFuncAdd 'Sysfilesearch', 'RexxUtil', 'Sysfilesearch'
  8.  
  9. /* check com port */
  10. call sysfilesearch 'DeviceOpts#01','options\standard.zoc',comport
  11. compos = pos('COM',comport.1)
  12. if compos > 0 then do
  13.    comport = substr(comport.1,compos + 3, 1)
  14. end
  15. else do
  16.    say 'Error, ZOC is not set on a COM port.'
  17.    exit
  18. end
  19.  
  20. /* check download path */
  21. call sysfilesearch 'DownloadPath','options\standard.zpa',dlpath
  22. dlpath = substr(dlpath.1,pos('="',dlpath.1) + 2,lastpos('"',dlpath.1) - pos('="',dlpath.1) - 2)
  23.  
  24. /* remove traling slash from 'smodemdir' */
  25. if lastpos('\',smodemdir) = length(smodemdir) then smodemdir = left(smodemdir,length(smodemdir) - 1)
  26.  
  27. /* set smodem parameter for non-standard com port settings */
  28. if irq <> '' then irq = insert('/i:',irq)
  29. if addr <> '' then irq = insert('/a:',addr)
  30.  
  31. /* launch smodem.exe */
  32. zocxferdosshell smodemdir'\spdos t31 'smodemdir'\smodem.exe /p:'comport addr irq' /d 'dlpath
  33.