home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / OS2 / CMDLINE1.ZIP / SHOWCODE.CMD < prev   
OS/2 REXX Batch file  |  1994-02-07  |  675b  |  26 lines

  1. /*
  2.        SHOWCODE.CMD
  3.  
  4.        Written by: Albert Crosby <acrosby@comp.uark.edu>
  5.        Date: Feb 11, 1994
  6.  
  7.        Purpose: Companion program to CmdLine.CMD, a full featured
  8.                 implentation of the OS/2 command line parser in REXX.
  9. */
  10.  
  11. say "Press the key desired: "
  12. key=SysGetKey("NoEcho")
  13. if key=d2c(0)|key=d2c(224) then
  14.    do
  15.    key2=SysGetKey("NoEcho")
  16.    say "Key pressed was an extended key."
  17.    say "Codes were: "c2d(key) c2d(key2)
  18.    say "The variable to define this key for CmdLine would be:"
  19.    say    "history.key."c2d(key2)
  20.    end
  21. else
  22.    do
  23.    say "The key pressed was not an extended key."
  24.    say "Code was: "c2d(key)
  25.    end
  26.