Jump to content

Recommended Posts

Posted (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 Start

AutoItSetOption("TrayOnEventMode", 1); enable event mode

Dim $message1

$message1="Program is running"; title that appair into the ToolTip

WinWait("[CLASS: tooltips_class32, TITLE: Program is running]")

msgbox(64, $message1, "Event OK")

Sorry for my english

thank you

Filippo

Edited by filippo260367
Posted

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

Posted

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. :D

For my opinion, the problems is "how to do capture the event tray icon" ?

Bye

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

Posted

UPDATE ....

Lars, I used Loop but WinWait never do not return True value ... always False.

Any other idea ?

Thank

Filippo

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

Posted

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

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
×
×
  • Create New...