
                                   Getkey 

        Included with DIRS is GETKEY.COM, an errorlevel returning utility
If you desire to implement USER & VIEW.BATs you may also want to consider
using " Getkey ".  Getkey returns errorlevels.  I'm certainly no authority
on errorlevels however, I can tell you that when your running a batch file
you can include a Getkey statement which will return errorlevels coinciding
with their respective keystrokes.

Syntax = Getkey [/u]

Ex.1

:example.bat
@echo off
echo.
echo Which ?į This statement is the only
getkey /uį Getkey statement with /u option.  thing you will see on the
if errorlevel 32 if not errorlevel 33 goto endĿ  command line other than the
if errorlevel 27 if not errorlevel 28 goto end   position of the cursor.
if errorlevel 13 if not errorlevel 14 goto runĴ
                                               
                                  Errorlevel 
                                  statements indicating what operands should
                                  be performed with the convention of that
                                  keypress associated with the specified
                                  errorlevel.
                                  
Errorlevel 32 is returned when  
the space bar is stroked . Also, you should note that the decimal equivalent
as indicated so in various ASCII charts or as we shall say in "ASCII.EXE"
(supplied with DIRS) of a spacebar is 32, just as a 27 is an  (ESC), or
13, a ^M or a return.

The /[u] option. Stating with the /u option simply instructs getkey to
position the cursor beneath the last character in the echo statement
preceding the Getkey statement.

NB: The echo statement seen below is not a pre-requsite to Getkey it's
merely an aid to lessen some of the complexity to errorlevel statements.
This isn't to say that they're complicated but that it suffices to lessen
some of the confusion.

Ex.

echo.
echo Which ?į With the /u option the cursor
getkey /u        would appear beneath the " ? ".
                 W/o it the cursor would appear
                 one column to the right.

Also, another alternative to the appearance of what is echoed may be
a cursor toggling util.  It toggles the cursor between it's innate
positon of "flashing" (Normal) vs. (Hidden).

It may behoove you to brush up on some of these techniques as they will
significantly enhace your programming skills should you not be familiar
with them already. Should you need to know more about DOS errorlevels
and their functions consult one of several programmers reference manuals.

RNG
