Re: Sounding audible alert in script. by harrykrishna
harrykrishna
Sat Dec 03 10:40:48 CST 2005
If you want to just use the internal speaker, you could try something
like this. Just remember to copy the character below. If you have
trouble, it is HEX 07 :
' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Option Explicit
Dim objShell
Set objShell = CreateObject("Wscript.Shell")
' Beep 1 time:
objShell.Run "%comspec% /c @ECHO ",2
WScript.Sleep 5000
' Beep 5 times:
objShell.Run "%comspec% /c @ECHO ",2
Set objShell = Nothing
' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
HTH
"McKirahan" <News@McKirahan.com> wrote:
>""Crash" Dummy" <dvader@deathstar.mil> wrote in message
>news:OYmyChF9FHA.3544@TK2MSFTNGP09.phx.gbl...
>> I would like to sound a periodic "ding" in a long running script,
>something that
>> would sound without halting script progress. All I have been able to do is
>> insert a message box, but that stops the script until the box is dismissed
>by
>> the user. Is there any way to sound an alert without stopping for a user
>> response?
>> --
>> Crash
>
>Can you adapt this for your purposes?
>
>It pops up the message "Still running ..." for one second.
>Five seconds later it pops up again.
>
>Option Explicit
>Const cVBS = "Still.vbs"
>Dim objWSS
>Set objWSS = CreateObject("Wscript.Shell")
> objWSS.Popup "Still running ...",1,cVBS,vbInformation
> WScript.Sleep 5000
> objWSS.Popup "Still running ...",1,cVBS,vbInformation
>Set objWSS = Nothing
>
>
Ha®®y
HarryKrishna.nospam@online.ie