Sign in to follow this  
Followers 0
BlueScreen

Problem with TrayTip.

3 posts in this topic

Hey, Take a look at this:

$var=0
while $var=0
    TrayTip("Info", "Blablabla", 1, 1)
    Sleep (15000)
;Some code here
    $var=1
Wend

The TrayTip dissapeares too early! It is supposed to dissapear only after "Sleep (15000)" command is over :whistle:

Yet, if changing to "Sleep (5000)" it's all good.

while $var=0
    TrayTip("Info", "Blablabla", 1, 1)
    Sleep (5000)
;Some code here
    $var=1
Wend

Did I miss something?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I believe Windows has a maximum amount of time it will display any balloon tip.... that or AutoIt's implementation has an upper bound on the display time.

I think that switching among multiple programs/windows also causes the balloon to disappear (pop?:whistle:) faster....

Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Did I miss something?

Yep, the third parameter of the TrayTip function specifies the time the tip will last. It's not affected by Sleep or anything else (except another call to TrayTip). The only time you need to call a sleep right after a TrayTip is if the program is about to exit, it destroys the tip, so you will have to insert a sleep there to give the tip time to display (Again, though, the time the tip will display is NOT affected by this sleep timer).

I believe Windows has a maximum amount of time it will display any balloon tip.... that or AutoIt's implementation has an upper bound on the display time.

CyberSlug is right, the MSDN documentation claims Windows has a lower and upper bound for the time a tip will be displayed. These times may be listed for Windows 2000, because on Windows XP, I've had tips display both longer and shorter than the ranges.

CyberSlug is also partly correct when he says:

I think that switching among multiple programs/windows also causes the balloon to disappear (pop?) faster....

Balloon tips have also had erractic behavior on my Windows XP systems. I've had tips not appear when they are supposed to but some hours later because somthing full-screen (A game, the screensaver, et cetera) was occupying the screen when the tip was triggered. This isn't limited to AutoIt or my own programs, either. I've had the speed display for my dial-up connection do the same thing as well as other programs.

I've not had this issue with AutoIt, however, I presume because when AutoIt is running, nothing is dominating the screen which make make a tip unable to display.

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