home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / lptoo212.zip / LPTDD.CMD < prev    next >
OS/2 REXX Batch file  |  2000-01-23  |  2KB  |  52 lines

  1. /* Make a best guess for LPTDD driver required switches      JvW 07-09-99    */
  2. /*                                                                           */
  3. /* 07-09-99   JvW Initial version, to be delivered with LPTool       2.07    */
  4. /* 10-09-99   JvW Updated, fixed bug in recognition of 0x03BC port   2.07a   */
  5. /* 22-01-2000 JvW Removed unneeded parameter parsing and naming      2.11    */
  6.  
  7.    Parse Source with . myself .
  8.    Parse Arg arguments
  9.  
  10.    if arguments = '' then
  11.    do
  12.       Say ''
  13.       Say myself': checking LPT ports using RMVIEW ...'
  14.       Say ''
  15.       address cmd '@rmview /io | find /i "parallel" | RXQUEUE'
  16.       if rc == 0 then
  17.       do while queued() > 0
  18.          pull portline
  19.          parse upper value portline with 'I/O = 0X' addr rest
  20.          if length(addr) > 1 then
  21.          do
  22.             select
  23.             when addr = '0378' then
  24.                do
  25.                  Say 'Recommended LPTDD switch: "-P:1" for port' addr
  26.                end
  27.             when addr = '0278' then
  28.                do
  29.                  Say 'Recommended LPTDD switch: "-P:2" for port' addr
  30.                end
  31.             when addr = '03BC' then
  32.                do
  33.                  Say 'Recommended LPTDD switch: "-P:3" for port' addr
  34.                end
  35.             otherwise
  36.                  Say 'Non-standard port address' addr 'not supported!'
  37.                nop
  38.             end
  39.          end
  40.       end
  41.    end; else
  42.    do
  43.       Say ''
  44.       Say 'Make a best guess for LPTDD driver required switches, JvW 10-09-99'
  45.       Say ''
  46.       Say 'Usage:' myself
  47.       Say ''
  48.       Say 'Requires OS/2 version 4 or newer!'
  49.    end
  50. exit 0
  51.  
  52.