Okay the question wasn't entirely accurate... makes me seem very noobish... Here's what i really want to ask: Is it possible to remove the requirement to push <enter> after a set /p thing? I'm asking this because i have a long script with a ton of Y/N questions and wish to make easier user interface by having the user only need to press <Y> and not <Y> <enter> (or <N>) and some questions have an additional answer like Y N or Q (for like question or something).
I also realize that the answer is probably "No." Hopefully it's "Yes" or (more likely) "Yes, but requires a TON of code." and like I said not a noob so give me the TONS of code if you answer the latter!
FYI It would be helpful if there was a certain amount of time to answer the question ex. If you don't press Y or N in 30000 milliseconds then auto pick N. That might come in handy in a few spots of my script.
What versions of windows must it run on? The "choice" command is available in vista/7 and can do single character input without enter and has a timeout default option.
@Judago Thank you. I have windows 7
And as an added bonus... I no longer have to worry about people answering a Y/N question with something like Q. That will make coding a little easier...
No worries!
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |