filippo260367 Posted June 12, 2009 Share Posted June 12, 2009 (edited) Hello to all, I would be able to intercept the event that is created when a message (tooltip) appears in the tray area. Example: in my area I have a tray icon for my program, on this icon appears "Program is running", when this message appears I would that start my script. With the utility "AutoIt Windows Info" know that the class of the tray is "tooltips_class32", its title is "Program is running". I tried this simple code but does not work ... why?my simple code:; Script StartAutoItSetOption("TrayOnEventMode", 1); enable event modeDim $message1$message1="Program is running"; title that appair into the ToolTipWinWait("[CLASS: tooltips_class32, TITLE: Program is running]")msgbox(64, $message1, "Event OK")Sorry for my englishthank youFilippo Edited June 12, 2009 by filippo260367 Link to comment Share on other sites More sharing options...
Lars Posted June 12, 2009 Share Posted June 12, 2009 Sometime I don't know why better use WinWaitActive("Program is running", "", 5) ; Look at the timeout Sleep (1000);Maybe sleep a sec ; Loop to WinWaitActive again Don't know but for regular windows this sometimes works better. Lars Link to comment Share on other sites More sharing options...
filippo260367 Posted June 12, 2009 Author Share Posted June 12, 2009 Thank Lars,I changed my script and I WinWait replaced with WinWaitActive, as you suggested me. But now the script runs in any case (after 5 seconds )... even without the message appears. For my opinion, the problems is "how to do capture the event tray icon" ? ByeSometime I don't know why better useWinWaitActive("Program is running", "", 5) ; Look at the timeoutSleep (1000);Maybe sleep a sec; Loop to WinWaitActive againDon't know but for regular windows this sometimes works better.Lars Link to comment Share on other sites More sharing options...
filippo260367 Posted June 12, 2009 Author Share Posted June 12, 2009 UPDATE ....Lars, I used Loop but WinWait never do not return True value ... always False.Any other idea ?ThankFilippoSometime I don't know why better useWinWaitActive("Program is running", "", 5) ; Look at the timeoutSleep (1000);Maybe sleep a sec; Loop to WinWaitActive againDon't know but for regular windows this sometimes works better.Lars Link to comment Share on other sites More sharing options...
Lars Posted June 12, 2009 Share Posted June 12, 2009 No, Sorry no more ideas, I never catch tray events, I write autoit for a whole lot of people lately but never used.... May be if the app starts you can monitor your processes...? If a process starts at the same moment use that to trigger. Good luck, nice weekend 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