imoh Posted April 25, 2006 Share Posted April 25, 2006 Hi, 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 a b c ----------->c1, c2, c3----->c3a, c3b, c3c d e f 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? Thanks Link to comment Share on other sites More sharing options...
imoh Posted April 26, 2006 Author Share Posted April 26, 2006 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. Link to comment Share on other sites More sharing options...
Uten Posted April 26, 2006 Share Posted April 26, 2006 Post your systray menu code and I'll try to help you out. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
imoh Posted April 26, 2006 Author Share Posted April 26, 2006 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" sample.bmp Link to comment Share on other sites More sharing options...
Uten Posted April 26, 2006 Share Posted April 26, 2006 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 Thought you were creating your own menu in AutoIt : Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
mr.underperson Posted May 7, 2006 Share Posted May 7, 2006 You could put TrayItemGetText(@TRAY_ID) in a for...next loop and build an array of any non-zero returned values. No? -mu 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