Home > Archive > VBScript > November 2004 > Playing sounds?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Dennis 2004-11-29, 3:59 pm |
| What is the simplest way to play a WAV file from vbscript?
Dennis
| |
| McKirahan 2004-11-29, 3:59 pm |
| "Dennis" <junk@galron.com> wrote in message
news:uyztA6Q1EHA.1652@TK2MSFTNGP11.phx.gbl...
> What is the simplest way to play a WAV file from vbscript?
>
> Dennis
Option Explicit
Const cRUN = "sndrec32 /play /close "
Const cWAV = "%windir%\media\ding.wav"
Dim objWSS
Set objWSS = CreateObject("Wscript.Shell")
objWSS.Run cRUN & Chr(34) & cWAV & Chr(34),0,True
Set objWSS = Nothing
| |
| Dennis 2004-11-29, 3:59 pm |
| Thanks!
Dennis
"McKirahan" <News@McKirahan.com> wrote in message
news:xJkqd.679334$8_6.509561@attbi_s04...
> "Dennis" <junk@galron.com> wrote in message
> news:uyztA6Q1EHA.1652@TK2MSFTNGP11.phx.gbl...
>
> Option Explicit
> Const cRUN = "sndrec32 /play /close "
> Const cWAV = "%windir%\media\ding.wav"
> Dim objWSS
> Set objWSS = CreateObject("Wscript.Shell")
> objWSS.Run cRUN & Chr(34) & cWAV & Chr(34),0,True
> Set objWSS = Nothing
>
>
|
|
|
|
|