home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / CFWANSRX.ZIP / CFWINPUT.CMD < prev    next >
OS/2 REXX Batch file  |  1992-04-27  |  1KB  |  47 lines

  1. /*╒══════════════════════════════════════════════════════════════════╕
  2.   │CFWINPUT PULL MIT Längenbegrenzung (c) Copyright 1991 by C.F.W.   │
  3.   │                                                                  │
  4.   ╘══════════════════════════════════════════════════════════════════╛
  5. */
  6. parse arg row,col,len,string
  7. string = left(string,len,'_')
  8. maxcol = col + len - 1
  9. call SysCurState 'ON'
  10. call SysCurPos row,col
  11. call charout,string
  12. call SysCurPos row,col
  13. do forever
  14.  c=SysGetKey('NOECHO')
  15.  parse value SysCurPos() with . cur_col
  16.  select
  17.    when c = 'α'
  18.     then
  19.        do
  20.         c = ''
  21.         b=SysGetKey('NOECHO')
  22.         select
  23.           when b='K'
  24.            then
  25.              call charout,'D'
  26.           when b='M'
  27.            then
  28.              call charout,'C'
  29.           otherwise
  30.            nop
  31.         end
  32.        end
  33.    when c2d(c) = 13
  34.     then
  35.      do
  36.       return strip(strip(SysTextScreenRead(row,col,len),,_))
  37.      end
  38.    when  cur_col >  maxcol
  39.     then
  40.        c=''
  41.    otherwise
  42.      nop
  43.  end
  44.  call charout,c
  45. end
  46. return ''
  47.