Jump to content

Recommended Posts

Posted (edited)

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
Posted

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

Posted

10x , but i want to use something different than "send" / "controlsend".

Is there another way?

I don't believe so.

Out of interest, how are you getting a value for $iSystray_ButtonNumber?

D

Posted

First use _GUICtrlToolbar_ButtonCount to get all numbers and then use _GUICtrlToolbar_GetButtonText to match the text of the icon i need to the number.

Posted (edited)

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

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
  • Recently Browsing   0 members

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