Jump to content
Sign in to follow this  
slappyd

Winwait newb help

Recommended Posts

slappyd

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

Share this post


Link to post
Share on other sites
slappyd

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.

Share this post


Link to post
Share on other sites
slappyd

thanks

Edited by slappyd

Share this post


Link to post
Share on other sites
Balmukundam

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 

Share this post


Link to post
Share on other sites
JLogan3o13

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


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Balmukundam

will not happen again ! 

Share this post


Link to post
Share on other sites
JohnOne
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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×