This will be entered in either DOS Edit or Notepad
TIA
PS - This is resent because my system clock was set to the wrong date!!
Peter Geddes
The beep character is the seventh ASCII character and is one of the
'control' characters. In the DOS editor, the beep character can be
obtained by pressing [Ctrl+[P][G]].
:: beep.bat (beeps once)
@ECHO off
ECHO [Ctrl+[P][G]]
::
This is the same batch created at prompt using redirection. Notice that the
[P] is not required here, and the beep character will appear in beep.bat.
C:\BAT>ECHO @ECHO OFF > beep.bat
C:\BAT>ECHO ECHO [Ctrl+[G]] >> beep.bat
--
Outsider, HB, BFP
MS-DOS 6.22, Windows for Workgroups 3.11, Netscape Navigator 4.08
"Men never do evil so completely and cheerfully as when they do it
from religious conviction." -- Blaise Pascal
You can enter it directly in the file, usually [Alt+[7]] with
[7] on the number keypad. Syntax varies slightly with particular
editor. May require [Alt+ [0] [0] [0] [7]] with NumLock ON, or Ctrl-P prefix.
Or, it's quite simple to generate it with debug, thus:
::====BEEP.BAT
@ECHO OFF
:: Make an beep character in environment variable BEEP
ECHO e100'SET %%1='7 0d 0a>%TEMP%.\BEEP.BAT
FOR %%F IN (rcx a w q) DO ECHO %%F>>%TEMP%.\BEEP.BAT
TYPE %TEMP%.\BEEP.BAT | debug %TEMP%.\BEEP.BAT>NUL
CALL %TEMP%.\BEEP.BAT BEEP
DEL %TEMP%.\BEEP.BAT
:: Instantiate %BEEP% in a ECHO to beep
ECHO. This is a beep %BEEP%
SET BEEP=
::====
This is just a cut-and-paste search-and-replace operation on
the COLOUR.BAT I've just posted, by the way<G>.
--
William Allen
TIA's
Peter Geddes
AFAIK, in a Windows DOS box, the ASCII=7 character,
which is what I generated, activates the "Default" sound
if you have configured one.
If you don't have one set, as I usually don't, the ASCII=7
character activates a BIOS-like beep.
Start, Settings, Control Panel, Sounds Applet, "Default Sound"
and set it to what you please, or remove the assignment
altogether to hear the BIOS beep.
I assume you have the Default Sound set to CHIMES.WAV.
Since the default sound is usually stored in the registry here:
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default\.current]
@="C:\\PathTo\\FileWithSound.WAV"
you could probably change it dynamically in a batch script
if you needed the script to use a different sound (and reset
it as the script ends).
--
William Allen