Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to create tones without launching Windows Media Player

22 views
Skip to first unread message

Sam Low

unread,
Jan 7, 2005, 8:42:35 AM1/7/05
to
In the old days, BASIC used to have a command (I think it was SOUND) that
could generate tones at a specified frequency for a specified duration that
is played on the built-in speaker. Is there some equivalent in VBScript?
Every machine today, from PC to server, still has that built-in speaker. I
am runnng some scripts and occasionally want to send some audio signals to
indicate certain events, and just ASCII 7 doesn't allow me to differentiate
different events.

Launching the giant WMP just to play a single tone seems like a gross
overkill.

Thanks in advance.


SubnetJO

unread,
Jan 7, 2005, 9:49:05 AM1/7/05
to
You may use the best player of the world... CoolPlayer!

It is a 584 KB player from the "source forge", available for download at page:
http://prdownloads.sourceforge.net/coolplayer/CoolPlayer215_Bin.zip?download

One zip file of less than 400 KB!!!

The player natively support MP3 and many other file formats!
Supports the playlists, you may add codecs and even... supports the "skins"!

Surely the best, in my opinion.
You can try with it.

I hope this can help,
SubnetJO
Italy


"Sam Low" ha scritto:

David H. Lipman

unread,
Jan 7, 2005, 10:25:16 AM1/7/05
to
Kixtart ( http://kixtart.org Kixtart is CareWare) has the ability built into their
interpreter

PLAY [FILE "path\filename.spk"] | "string" | "path\filename.wav"

There are four possible syntax forms:

- PLAY FILE "Jbond.spk"
- PLAY "0g256t 0g8d247f 4d165f 247f 8d262f 4d165f 262f 8d277f 4d165f"
- PLAY FILE "Ding.wav"
- PLAY "Chimes.wav"

--
Dave


"Sam Low" <samlo...@hotmail.com> wrote in message
news:%23NroE7L...@TK2MSFTNGP10.phx.gbl...

Torgeir Bakken (MVP)

unread,
Jan 7, 2005, 11:07:23 AM1/7/05
to
Sam Low wrote:

> In the old days, BASIC used to have a command (I think it was SOUND) that
> could generate tones at a specified frequency for a specified duration that
> is played on the built-in speaker. Is there some equivalent in VBScript?
> Every machine today, from PC to server, still has that built-in speaker. I
> am runnng some scripts and occasionally want to send some audio signals to
> indicate certain events, and just ASCII 7 doesn't allow me to differentiate
> different events.

Hi

Set oShell = CreateObject("Wscript.Shell")
sWaveFile = "%windir%\media\tada.wav"
oShell.Run "sndrec32.exe /embedding /play /close """ _
& sWaveFile & """", 0, True

--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx

David

unread,
Jan 7, 2005, 4:53:04 PM1/7/05
to
u can also embed this in your script:

WSHShell.Run "%comspec% /c echo " & Chr(07), 0, True
WSHShell.Run "%comspec% /c echo " & Chr(07), 0, True
WSHShell.Run "%comspec% /c echo " & Chr(07), 0, True

DT

Sam Low

unread,
Jan 7, 2005, 10:51:28 PM1/7/05
to
Thank you. But WScript.echo chr(7) would do the same.

I think I will launch sndrec32.exe as suggested by Torgeir.

Thanks all.

"David" <davi...@gmail.com> wrote in message
news:5E72ADB4-DD49-4CCC...@microsoft.com...

0 new messages