Click here for important information about

Solved Help with vars in batch?

February 10, 2012 at 19:44:49
Specs: Windows 7
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.

See More: Help with vars in batch?

February 10, 2012 at 23:09:47
✔ Best Answer
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.

Report •

February 11, 2012 at 19:19:09
@Judago Thank you. I have windows 7

Report •

February 11, 2012 at 19:36:13
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...

Report •

Related Solutions

February 12, 2012 at 00:08:05
No worries!

Report •

Ask Question