WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Sound and Media

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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.bat 
but 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:   W13218
Filename:   Make WinBatch Scripts Beep.txt
File Created: 2001:01:05:13:35:12
Last Updated: 2001:01:05:13:35:12