# Dos Menus nad Input



## TMLewiss (Feb 8, 2003)

Is there anyway to make a menu in DOS that allows you to just press the option you want and it goes to it without you haveing to press enter. EX: 

echo 1. +Programs 
echo 2. +Graphics 
echo 3. +Games 
echo 4. +Music 
echo 5. Notepad 
echo 6. Exit 
:Mainl
set /P CH="Choice: "
if "%CH%"=="1" goto Programs 
if "%CH%"=="2" goto Graphics
if "%CH%"=="3" goto Games
if "%CH%"=="4" goto Music
if "%CH%"=="5" "%SystemRoot%\system32\notepad.exe"
if "%CH%"=="6" exit
goto Mainl


Now is there a way to just hit 1 for option 1 and it goes there?
I cant use the choice command because I have XP. Thank in advance.


----------



## dtech10 (Jan 31, 2003)

Hi
I have WinXP Pro and the Choice commands works ok for me.


----------



## iwasthere (Jan 31, 2003)

in a DOS batch file there are different programs available ... some will look for "key entered" (and then "enter key pressed") ... others will look for "key touched" ...

you might also consider looking at DOS batch file programming ... the "if" statement to determine what key sequence has been pressed ... (look for key scan codes as well as key codes) ...


----------

