![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Is it possible to trap as an event when a certain sound plays, IE: Ding.wav Most will trap an event then play a sound file, however I want to get notified by trapping when the Ding.wav is played ? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Is it possible to trap as an event when a certain sound plays, IE: Ding.wav > Most will trap an event then play a sound file, Quote: > however I want to get notified by trapping when the Ding.wav is played ? > o f a s y s t e m - w i d e h o o k t h a t w a t c h e s f o r a n y p r o c e s s o p e n i n g t h e . w a v f i l e . T h a t ' s n o t a V B S - f r i e n d l y t a s k . M a y b e i t w o u l d h e l p t o e x p l a i n w h a t y o u ' r e t r y i n g t o a c c o m p l i s h . |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Is it possible to trap as an event when a certain sound plays, IE: Ding.wav On Thu, 02 Jul 2009 19:23:19 GMT, mayayana wrote: Quote: Quote: >> Most will trap an event then play a sound file, >> however I want to get notified by trapping when the Ding.wav is played ? > I c a n ' t t h i n k o f a n y t h i n g s h o r t > o f a s y s t e m - w i d e h o o k t h a t w a t c h e s > f o r a n y p r o c e s s o p e n i n g t h e . w a v > f i l e . T h a t ' s n o t a V B S - f r i e n d l y t a s k . > M a y b e i t w o u l d h e l p t o e x p l a i n w h a t > y o u ' r e t r y i n g t o a c c o m p l i s h . -- To be a man, you must have honor, honor and a penis! |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Is it possible to trap as an event when a certain sound plays, IE: Ding.wav Quote: Quote: Quote: > >> Most will trap an event then play a sound file, > >> however I want to get notified by trapping when the Ding.wav is played Quote: Quote: > > > > I c a n ' t t h i n k o f a n y t h i n g s h o r t > > o f a s y s t e m - w i d e h o o k t h a t w a t c h e s > > f o r a n y p r o c e s s o p e n i n g t h e . w a v > > f i l e . T h a t ' s n o t a V B S - f r i e n d l y t a s k Quote: Quote: > > M a y b e i t w o u l d h e l p t o e x p l a i n w h a t > > y o u ' r e t r y i n g t o a c c o m p l i s h . > Holy snapping crap! What happened? > If you mean the weird spacing it's because my first post got eaten by Microsoft's strange spam filter. I can never figure out what sets it off, so when it happens I just drop the text of my post onto a little Desktop script that I keep for the purpose. It inserts a space after every character. The result is not as easy to read, but at least it gets through. |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Is it possible to trap as an event when a certain sound plays, IE: Ding.wav Harold, I believe you could do this with a WMI Event Consumer script. Such a script is available in Ed Wilson's MSPRess book Windows Scripting with WMI (Self Paced Learning Guide). I attended a Microsoft sponsored workshop that was taught by the author of this book. Important note: The author made the class aware that a line was missing in the event consumer script in both the print and companion CD versions. To get the script to run, at the bottom of page 110 add the following line of code. objfilter.EventNameSpace = "root\cimv2" Hope that helps, Mark D. MacLachlan |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Is it possible to trap as an event when a certain sound plays, IE: Ding.wav Thanks, I will research the book. When Ding wav plays it is Southwest alerting at my pc. I want to trap and send a text to alert my cellphone. "Harold Little" <harold.little@xxxxxx> wrote in message news:OHXuhlx%23JHA.4560@xxxxxx Quote: > Most will trap an event then play a sound file, > however I want to get notified by trapping when the Ding.wav is played ? > |
My System Specs![]() |
| | #7 (permalink) |
| | Re: Is it possible to trap as an event when a certain sound plays, urkec wrote: Quote: > "Mark D. MacLachlan" wrote: > Quote: > > Harold, I believe you could do this with a WMI Event Consumer > > script. > > > > Such a script is available in Ed Wilson's MSPRess book Windows > > Scripting with WMI (Self Paced Learning Guide). > > > > I attended a Microsoft sponsored workshop that was taught by the > > author of this book. Important note: The author made the class > > aware that a line was missing in the event consumer script in both > > the print and companion CD versions. > > > > To get the script to run, at the bottom of page 110 add the > > following line of code. > > > > objfilter.EventNameSpace = "root\cimv2" > > > > Hope that helps, > > > > Mark D. MacLachlan > > > What is the WQL event query in question? -- |
My System Specs![]() |
| | #8 (permalink) |
| | Re: Is it possible to trap as an event when a certain sound plays, hls wrote: Quote: > Thanks, I will research the book. > When Ding wav plays it is Southwest alerting at my pc. > I want to trap and send a text to alert my cellphone. > I expect (even with a language more amenable to hooking than vbs) that you are going to have trouble detecting your "ding". For a start, if you wish to consider vb, then take a look at the vb Utilities found here. There are pre-programmed utilities which make it easy to implement various types of system hooks, including thread hooks (which you can do-it- yourself in vb) and system-wide hooks (needs c++ or some other more capable language such as delphi). http://allapi.mentalis.org/vbexample...?category=MISC You may have better luck with the process hook than anything else. I suspect that "Southwest" (whoever they are) will have to run some app or mini-app (IM?) to play the ding. It would be easier to insert a process hook or a window hook to catch the IM popup, than to attempt to catch an api call. (Generally one will call a multimedia api to play a wav file, rather than use a music player -- less overhead). cheers, jw ____________________________________________________________ You got questions? WE GOT ANSWERS!!! ..(but, no guarantee the answers will be applicable to the questions) |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| With UAC off my game sound plays. UAC on...not so much.. | Vista General | |||
| sound plays slowly | Vista music pictures video | |||
| WMP plays video avi but no sound | Vista music pictures video | |||
| WM PLAYS DVD'S BUT NO SOUND! | Vista music pictures video | |||
| Sound plays for like a minute | Vista General | |||