The only way I know of how to make the BEEP sound is by echoing the BELL character, which is Ascii number 7. Since I can't exactly type the BELL character, I wrote a quick script to retrieve it for me:
Code: Select all
@echo off
echo wscript.echo(chr(7)) > ~tmp.vbs
for /f %%a in ('cscript ~tmp.vbs') do (set beep=%%a)
del ~tmp.vbs
echo %beep%
pause
This sets the variable "beep" to the bell. Now if I echo "%beep%" it will make the BEEP noise.
I was thinking of just making a BEEP command in C++, but I wanted to do it without using any commands other than the built-in ones.
And also if you can provide a way to use this without using a TEMP file. That would help.