
Beep before popup message
Beep before popup messageNot to take anything away from Gunter's control :), an alternative is the Popup method in WSH. The Icon Property that you set can invoke some of your default sounds depending on what you have set for your sound events. Gunter's control will actually beep your PC Speaker (I believe), not through your sound card, which means you do not have to have a Sound card or a sound event configured which may be desirable, but on the other hand you get volume with their sound card :).
For example:
Dim oWSHShell
Dim intButton
Set oWSHShell = Wscript.CreateObject("Wscript.Shell")
intButton = oWshShell.Popup("This is a message to your user", 0, "My Message Title", 16)
This will invoke a message with an OK button and a Critical Sop Icon and it's associated sound event. The 16 is the NatType which sets the Icon type of which you can find info in the WSH documentation and further you can steal even more NatType's from the MessageBox function in VB (The doc's for VB cover this), I haven't found any that don't work from the VB Docs.....
Shawn
FYI: Have a look at WSHExtend.ocx in the WSH Bazaar. This
ActiveX control provides the WSHBeep method.
G. Born
Check out the WSH Bazaar at:
www.borncity.de
Hi!
Is there anything like
Wscript.Beep
How do you beep before bringing up a popup message screen
in WSH.
pls. discuss..