|
Answer» Hello there!
I was MAKING a COMPLICATED batch program when I decided I wanted the user to be able to say press 1 to do something, and press 2 to something else.
I have seen it done before. Heck, I even copied it into notepad and ran it before, but I did not save it.
Any method will work fine, but I would prefer something maximum of 10 lines if possible.
Thank you in advance.for getting user input in DOS batch, use set /pMore secure, in windows 7 use "choice"As mentioned above:
choice.exe is not AVAILABLE in XP but it has the advantage of single key entry to do things. For XP you can use choice.exe from Win9x etc or GET a clone of it, which you can find with google.
type choice /? for the help.Thank you very much, Lemonilla and foxidrive, I did choice /? and got the INFORMATION I needed. From what I had read, I thought Choice.exe was a sort of plugin, and If I wanted to share the program, that wouldn't be good. Now, I know different though. I suppose that means this case is CLOSED! exit "Topic: Specific Key press detection.bat"
|