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

Re: Sounding audible alert in script. by McKirahan

McKirahan
Mon Nov 28 15:20:13 CST 2005

""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




Re: Sounding audible alert in script. by \

\
Mon Nov 28 15:50:25 CST 2005

> Can you adapt this for your purposes?

Maybe. I'll play with it. Thanks.
--
Crash



Re: Sounding audible alert in script. by \

\
Mon Nov 28 16:20:04 CST 2005

> Can you adapt this for your purposes?

Yeah, that will work. Another example of the holes in my education. I didn't
know there was any way to limit how long a popup stayed up. I usually use
"msgbox," which doesn't have that option.
--
Crash




Re: Sounding audible alert in script. by LakeGator

LakeGator
Mon Nov 28 17:18:19 CST 2005


""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
>


Another approach would be to use the MSG command via SHELL:



Msg /time:1 Name Message text



This will issue a dialog box that stays up for 1 second to the victim named
Name.



It would seem that raising one of the Windows sound events would be simple
but I have no clue how and a quick search proved fruitless.



Re: Sounding audible alert in script. by Brian

Brian
Mon Nov 28 18:00:19 CST 2005

LakeGator 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
>>
>
> Another approach would be to use the MSG command via SHELL:
>
> Msg /time:1 Name Message text
>
> This will issue a dialog box that stays up for 1 second to the victim named
> Name.
>
> It would seem that raising one of the Windows sound events would be simple
> but I have no clue how and a quick search proved fruitless.

I had this snippet saved from somewhere or another:

Set oShell = CreateObject("Wscript.Shell")

sWaveFile = "%windir%\media\ding.wav"
oShell.Run "sndrec32 /play /close """ & sWaveFile & """",0,True

Re: Sounding audible alert in script. by \

\
Mon Nov 28 18:48:19 CST 2005

> I had this snippet saved from somewhere or another:

Hey, that works, right off the shelf! Thanks!

(I'll add it to my own snippets collection.)
--
Crash



RE: Sounding audible alert in script. by ESP

ESP
Tue Nov 29 09:49:04 CST 2005

hehehehe, a lil off subject, but you could have the system play Mary Had a
Lil' Lamb while they wait :-)

(Grap the free beep.exe cmd line utility off the web)

SAVE TO A BAT FILE:

@echo off
goto 1

:1
BEEP /H++E /L600
BEEP /H++D /L200
BEEP /H++C /L400
BEEP /H++D /L400
BEEP /H++E /L400
BEEP /H++E /L400
BEEP /H++E /L800
REM goto end
:2
BEEP /H++D /L400
BEEP /H++D /L400
BEEP /H++D /L800
REM goto end
:3
BEEP /H++E /L400
BEEP /H++G /L400
BEEP /H++G /L800
REM goto end
:4
BEEP /H++E /L600
BEEP /H++D /L200
BEEP /H++C /L400
BEEP /H++D /L400
BEEP /H++E /L400
BEEP /H++E /L400
BEEP /H++E /L400
REM goto end
:5
BEEP /H++E /L400
BEEP /H++D /L400
BEEP /H++D /L400
BEEP /H++E /L400
BEEP /H++D /L400
BEEP /H++C /L1100
:end


ESP




""Crash" Dummy" wrote:

> 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
>
>
>

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