356Views10Replies

Author Options:

I need a simple way to program a batch file to emit a beep. Answered

I basically need a simple way to have a batch file emit a beep when i want it to, say, after a phrase or pause. Is there a simple way to do that. I also need it it to be able to make as many beeps as i want in a row.

Discussions

Embed ASCII 0x07 [Ctrl-G] in an echo statement.

. First thing I thought of. I tried echo <ctrl-G> on my XP system. It would beep from the cmd line, but not from a bat file (dbl-clicking on the file). I don't understand that.

Batch files interpret code slightly different from the actual command prompt.

I dont know why, it didnt work.

NM said the same thing. Weird. Sorry to have misdirected you :-(

This is very easy, I don't know why you are having trouble with it.

Put the following into your command prompt:

@echo [CTRL+G] > "noise.txt"
start noise.txt

Remember to replace "[CTRL+G]" with you actually pressing those buttons.

When you are done, put in this code:

del noise.txt

And there you have it.

Why are there so many different ways of making a beep, but I can't get any of them to work? Is there a web site I can go to get downloadable batch files? Can anyone help me?

echo c | choice /c:ab >nul