Jump to content
Sign in to follow this  
ycomp

don't seem to have much control over traytip timeout

Recommended Posts

ycomp

Hi, I know in the help it says windows can not pay much attention to the traytip() timeout parameter. However, if I'm around the computer then they don't stick around long enough for my needs.

Is there a way to make it stick around for around 10 seconds or at least longer than it does when i give it a 10 sec timeout?

If I am away from computer then I like the behaviour windows has of leaving the traytip there until I come back. I just want to extend the delay to long enough that I can notice it and read the whole thing while I'm working at the computer.

any ideas?

Share this post


Link to post
Share on other sites
martin

Hi, I know in the help it says windows can not pay much attention to the traytip() timeout parameter. However, if I'm around the computer then they don't stick around long enough for my needs.

Is there a way to make it stick around for around 10 seconds or at least longer than it does when i give it a 10 sec timeout?

If I am away from computer then I like the behaviour windows has of leaving the traytip there until I come back. I just want to extend the delay to long enough that I can notice it and read the whole thing while I'm working at the computer.

any ideas?

I assume that the tray icon is for an AutoIt script.

Instead of traytip you could set an event for mouse over the tray icon using

Opt("TrayOnEventMode", 1);set event mode for tray events

TraySetOnEvent(-11,"MOFunc" set a function for mouseover

Then you can set a tool tip in the mouseover envent function MOFunc. The tool tip can stay there as long as yu want.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
ycomp

Hi Martin,

thanks for you reply... however, I'm using the tooltip for something else. I need a TrayTip (notification balloon) and my question is regarding making it stick around longer.. if anyone has any ideas, let me know.

Share this post


Link to post
Share on other sites
martin

Hi Martin,

thanks for you reply... however, I'm using the tooltip for something else. I need a TrayTip (notification balloon) and my question is regarding making it stick around longer.. if anyone has any ideas, let me know.

Are you talking about tray tips or balloon tips?

Balloon tips are popup notifications which appear to inform the user of something. I think they last for 30 seconds max but the timing is suspended if there is no user activity so that the user will see it on returning to the computer. (I think that's correct.) I don't think it's the same with tray tips which are triggered by mouse over the tray icon and last a maximum of 30 seconds.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
ycomp

Are you talking about tray tips or balloon tips?

Balloon tips are popup notifications which appear to inform the user of something. I think they last for 30 seconds max but the timing is suspended if there is no user activity so that the user will see it on returning to the computer. (I think that's correct.) I don't think it's the same with tray tips which are triggered by mouse over the tray icon and last a maximum of 30 seconds.

there are 2 functions I use

TrayTip()

and TraySetToolTip()

while I use both of them for various things, I am talking about the former... the balloon one... )

I am only getting mine to stick around for a few seconds... even if I specify 10... basically as soon as they reach 100% opaqueness, they start disintegrating again, so it is hard to read unless you look quickly.. or if you are not at computer and thus not touching mouse or keyboard... then they stick around fully opaque and you can read them.

Edited by ycomp

Share this post


Link to post
Share on other sites
martin

there are 2 functions I use

TrayTip()

and TraySetToolTip()

while I use both of them for various things, I am talking about the former... the balloon one... )

I am only getting mine to stick around for a few seconds... even if I specify 10... basically as soon as they reach 100% opaqueness, they start disintegrating again, so it is hard to read unless you look quickly.. or if you are not at computer and thus not touching mouse or keyboard... then they stick around fully opaque and you can read them.

You are using TrayTip, so you don't have to use it. Why not do your own thing then you can do what you want.

For example

#include <windowsconstants.au3>
Const $WS_EX_COMPOSITED = 0x2000000
 $Hgp = GUICreate("",300,20,@DesktopWidth - 350,@DesktopHeight - 50,$WS_POPUP,$WS_EX_COMPOSITED)
 WinSetOnTop($Hgp,"",1)
 GUISetBkColor(0,$Hgp)
 $lab = GUICtrlCreateLabel("  something to say here, click when you've read it",1,1,298,18)
 GUICtrlSetFont($lab,10)
 GUICtrlSetBkColor(-1,0xffffff)
 GUISetState()
$ic = 0
$tt = TimerInit()
While GUIGetMsg() <> $lab
    If TimerDiff($tt) > 100 Then
        $tt = TimerInit()
        $ic += 1
    EndIf
    If $ic = 10 Then GUICtrlSetBkColor($lab,0xffff00)
    If $ic = 20 Then GUICtrlSetBkColor($lab,0xffffff)
    If $ic > 20 Then $ic = 0
WEnd

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
ycomp

Hi Martin, that's quite cool... thanks

Share this post


Link to post
Share on other sites
krasnoshtan

you can also use this

TrayTip ("qwerty", "qwerty", $max_time)
sleep ($your_time_to_go_out_traytip)
Opt("TrayIconHide", 1)
sleep (100)
Opt("TrayIconHide", 0)

 

Edited by krasnoshtan

Share this post


Link to post
Share on other sites
BrewManNH

This is a 9 year old thread, no one needs this information anymore.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

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  

×