Jump to content
Sign in to follow this  

Invoking Multilevel Menu From The Systray Icon

Recommended Posts


I am new to scripting in AutoIT. I have to ask the gurus here on how to achieve this specific task:

I have a multilevel menu from the systray which looks like this when I right click on the systray icon



c ----------->c1, c2, c3----->c3a, c3b, c3c




a,b,c,d,e,f are first level menus

c1,c2,c3 are second level menus

c3a, c3b, c3c are third level menus

Clicking c, leads to the next level of menus which has c1, c2, c3. c1 and c2 dont have any next level menus. Clicking c3 takes to the next level of menu which has c3a, c3b, c3c. The level 3 menu items are not fixed and may change.

- How do I go to say level2 or level 3 menus?

- How do I find the number of items in a level2 or level3 menu?

- Some level2 or level3 menu items may show up in bold or with a bitmap next to it. How do I check which level2 or level3 menu item is in bold or has the bitmap icon next to it?

When I open the "AutoIT Active Windows Info", I dont see anything in the ControlID parameter. It just shows up blank.

Can someone point me where to start looking? Is there any script snippets that I can look at?


Share this post

Link to post
Share on other sites

I was able to go to the sublevel menus. But is there a way to

- Find the number of items in each sublevel menu

- The item list in each sublevel menu

I didnt see any reply. Please help me out here.

Share this post

Link to post
Share on other sites

To explain my issue a bit more, consider the attachment, when I right click on the "google desktop search icon" on systray, click up arrow twice to reach "More", click right arrow, there is a second level menu:

1) Through a script how do I find out there are 6 items in the submenu

2) The names of the menu items eg: Deskbar, Floating Deskbar etc

3) How do I know which has the selection beside it. In this case it shows "None"


Share this post

Link to post
Share on other sites

I'm afraid you have to mess around with the menu API found in user32.dll to achive this.

GetMenuItemCount and GetMenuItemID are functions to consider.

The problem is that The systray is a shell extention. And menues are created in that context. And you do not have to use the menu API to achive this. You can create your own, and only catch when your suposed to show your menu.

Have not scripted menus in the tray myselfe, so I can't give you a working solution :think: Thought you were creating your own menu in AutoIt :

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...