How to Make WinBatch Scripts Beep
Keywords: beep
Question:
Is there a way to send a "Beep" to my PC speaker?Note: this question is specifically directed to the internal PC Speaker, not the normal multimedia soundcards and speakers on modern equipment. For those, the built in WinBatch BEEP command will cause a beep....
Answer:
You can write a DOS batch file that beeps by doing the following- at the DOS prompt type:echo @echo (Alt-7)>beep.batbut instead of typing the characters: "(Alt-7)", you hold down the Alt key and press 7 on the numeric keypad.Don't use the 7 on the qwerty part of the keyboard, it has to be on the keypad, and Num Lock has to be on.
The effect of this is to output the characters:"@echo " followed by a non-ASCII character with a decimal value of 7, into a new file called beep.bat
If you put beep.bat in a directory on your PATH, you can make your winbatch files beep by adding:
RunIcon("beep.bat","")to your *.wbt file.You'll probably want to set the properties for the beep.bat DOS window to close on exit too.
Article ID: W13218Filename: Make WinBatch Scripts Beep.txt