Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Empty Keyboard Buffer in batch/VBS
Name: keridbey Date: March 24, 2008 at 05:51:48 Pacific OS: WinXP CPU/Ram: 1.83 Ghz / 1 Gb Product: Dell
Comment:
Does anyone know of a way to programmatically clear the keyboard buffer (or temporarily block it from receiving any new keystrokes)? There is a batch file that many people in my office use frequently, and in certain circumstances a standard input prompt changes from the norm; however, the user is used to entering certain information at the normal prompt, so they enter that information instead of reading the prompts, which can lead to problems. The popular idea was to use CHOICE.exe to stop them, but the ear-piercing beep it produces when the user hits a key other than what they should can be heard for quite a distance. I'm just hoping to render what they type for about five seconds moot, either in batch or possibly a VB script.
Summary: If you are using keypressed it will only tell you that the keyboard buffer has a character waiting. If you want to be certain that the keyboard buffer is cleared then place an until loop in the right...
Summary: is there a way to use a simple yes no VB script in batch file. what i want to do is have a batch file do tasks but as an example have it ask YES or no popup in VB to exit or to back to the main men...