slappyd Posted July 17, 2011 Share Posted July 17, 2011 Hello all, I am a completely new to script of any kind. This is what I have done. The program Google talk when installed gives notifications for new chat messages, calls and gmail, however sound notification is available for voice and calls only gmail is limited to visual notification only (a popup) What I wanted to do was have a script wait for the popup and then play a sound file. After looking at many post I was able to accomplish this. With this script. While 1 sleep(35000) WinWait ( "Google Notification" , "") SoundPlay("C:\GTsoundformail\GTGMsound.wav",1) WEnd Everthing is great new mail comes in, window pops up and I get "You've got mail" sound (or whatever sound I want) Then I noticed that if I right click on gtalk Icon and select check mail now, a popup pops up That states "no new mail" and my sound file plays. I do not want it to play, however this popup is same Title and same Class as the pop up for new mails, so I have no clue what to do to tell them apart. It is not a big deal I really never use the manually check mail but it is annoying me and if I give script to someone else I would like to first fix this. Any help at all I would appreciate. Thx Link to comment Share on other sites More sharing options...
JohnOne Posted July 17, 2011 Share Posted July 17, 2011 I'm going to assume that the text of the popup is different, so add some of the popups text along with the windo title. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
slappyd Posted July 17, 2011 Author Share Posted July 17, 2011 Thanks, but the only thing that is in the new mail popups is email snippets which are all different and if, lets say there are 5 new mails and then a 6th email came in the popup would say 6/6 followed by some of the info in the email so the only thing that is in every new mail popup is the "/" that was between the 6 and 6 in my example it could be 1/1 or 1/2 and so on, I assume you are saying put part of text like this WinWaitactive ( "Google Notification" , "/") using the "/" because that is all I really have, I tried that and it didn't work. Remember I have no experience at all. Link to comment Share on other sites More sharing options...
slappyd Posted July 17, 2011 Author Share Posted July 17, 2011 (edited) thanks Edited July 17, 2011 by slappyd Link to comment Share on other sites More sharing options...
Balmukundam Posted July 19, 2016 Share Posted July 19, 2016 guys i am also having to make the same Assignment ! I had tried many times but couldn't able to make it ! Can you please let me suggest for this as you had already worked on it .. thanks Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 19, 2016 Moderators Share Posted July 19, 2016 @Balmukundam you have already been warned against creating multiple threads, now you're hijacking someone else's post. Your issue may be the most important thing in the world to you, but it doesn't mean it is for everyone else. You need to stick to your one thread, and show some patience. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Balmukundam Posted July 22, 2016 Share Posted July 22, 2016 will not happen again ! Link to comment Share on other sites More sharing options...
JohnOne Posted July 27, 2016 Share Posted July 27, 2016 While 1 sleep(35000) $hwnd = WinWait ( "Google Notification" , "") $text = WinGetText($hwnd) If StringInStr($text, "no new mail") Then ContinueLoop SoundPlay("C:\GTsoundformail\GTGMsound.wav",1) WEnd Something like that AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now