From: DRA on
I sthere any way to play a .wav file in VBScript in VISTA without using a
media player. I tried using wmplayer, but there is no way to start it
windowless or get rid of the window after it plays (i.e., no command line
parameters as Xp's sndrec32).
Thanks,
Don
From: Christoph Basedau on
Am 27.03.2010 22:22, schrieb DRA:
> I sthere any way to play a .wav file in VBScript in VISTA without using a
> media player. I tried using wmplayer, but there is no way to start it
> windowless or get rid of the window after it plays (i.e., no command line
> parameters as Xp's sndrec32).

Hi

afaics if you automate WMP, it's hidden by default

Set wmp = CreateObject("WMPlayer.OCX")
wmp.settings.autoStart = True
'wmp.settings.volume = 50
wmp.URL = "C:\Windows\Media\tada.wav"

'wait til it stops
while wmp.Playstate <> 1
WSH.Sleep 100
wend


Chris
 | 
Pages: 1
Prev: Execute cmd from a list
Next: Insert Into error