home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rox.zip / cmdline.cmd next >
OS/2 REXX Batch file  |  1994-04-07  |  745b  |  33 lines

  1. /*------------------------------------------------------------------
  2.  * cmdline.cmd :
  3.  *------------------------------------------------------------------
  4.  * 08-23-93 originally by Patrick J. Mueller
  5.  *------------------------------------------------------------------*/
  6.  
  7. if RxFuncQuery("RoxLoadFuncs") then
  8.    do
  9.    rc = RxFuncAdd("RoxLoadFuncs","Rox","RoxLoadFuncs")
  10.    rc = RoxLoadFuncs()
  11.    end
  12.  
  13. if (0 = RoxQueryClassLoaded("CmdLine")) then
  14.    rc = RoxLoad("CmdLine.rox")
  15.  
  16. kbd = RoxCreate("CmdLine")
  17.  
  18. say "Enter 'quit' to quit"
  19.  
  20. do forever
  21.    rc = charout(,"Enter line > ")
  22.  
  23.    line = .getLine(kbd)
  24.  
  25.    if (line = "quit") then
  26.       leave
  27.  
  28.    say
  29.    say ".getLine returned '"line"'"
  30. end
  31.  
  32. rc = RoxDestroy(kbd)
  33.