Jump to content

How to click a button from a taskbar tray icon ?


Juvigy
 Share

Recommended Posts

I have outlook 2007 icon in the tray.

I manage to right click on it using:

_GUICtrlToolbar_ClickButton($hSysTray_Handle, $iSystray_ButtonNumber, "right")

Which opens the menu: Please see attachment.

Does anyone now how to click one of the buttons there ? Lets say "Open Outlook" ?

The autoit window tool doesnt show anything.

@Edit:

Readded attachment

post-38127-12559525163868_thumb.jpg

Edited by Juvigy
Link to comment
Share on other sites

Yes , that would work for this particular case but there are cases that the shortcut is not so easy to find and also some cases that the keyboard shortcut only selects the "button"(like in the attachment) or there is no shortcut at all. Is there a better more reliable way?

post-38127-12560217588015_thumb.jpg

Link to comment
Share on other sites

I think that in this case Send/ControlSend functions are sufficiently reliable methods for such task. You can try this approach, put a global boolean variable to tell the callback function whether it should call your function with the handle of the new popup menu window and it's hmenu and then do your stuff. Another approach is to use _GUICtrlMenu_GetItemRect() and click it. Again, Send/ControlSend are sufficient.

Edited by Authenticity
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...