mcgrabowski Posted April 12, 2021 Share Posted April 12, 2021 I have a drop down menu that is actually a toolbar. So far I'm able to focus on the toolbar, and using coordinates, I can click on the 'ACTION' menu item. But I'm struggling to figure out how to click on the sub menu item 'Print'. I thought maybe sending another controlclick function offset down to the 'Print' item would work, but it does not seem to be. Dragging the Finder Tool does not seem to allow me to get info on toolbar sub-menu items like this. Looking for suggestions/pointers on dealing with menus like this. Here is the Window Info for the Menu Bar: Here is what I most recently tried, that last ControlClick does not seem to be doing anything for me though. The first ControlClick does open the ACTION menu: ControlFocus($hWnd, "", "[CLASS:BCGPToolBar:400000:8:10003:10; INSTANCE:2]") ControlClick($hWnd, "", "[CLASS:BCGPToolBar:400000:8:10003:10; INSTANCE:2]", "left", 1, 233, 11) Sleep(1000) ControlClick($hWnd, "", "[CLASS:BCGPToolBar:400000:8:10003:10; INSTANCE:2]", "left", 1, 233, 158) Link to comment Share on other sites More sharing options...
mcgrabowski Posted April 12, 2021 Author Share Posted April 12, 2021 Apparently my screenshots did not come through.. attached is a screenshot of what the menu looks like, and a screenshot of the Window Info details. Link to comment Share on other sites More sharing options...
argumentum Posted April 12, 2021 Share Posted April 12, 2021 ...I'm in a hurry right now, so, ....try this: Send( Alt-A ) then send the letter that is underlined in Print when you press the alt key. If that works then I guess thats that mcgrabowski 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
mcgrabowski Posted April 12, 2021 Author Share Posted April 12, 2021 Well, thanks for that. That seems to work just fine. Here is what I wound up with: ; Trigger Print ControlFocus($hWnd, "", "[CLASS:BCGPToolBar:400000:8:10003:10; INSTANCE:2]") Sleep(1000) ControlSend($hWnd, "", "[CLASS:BCGPToolBar:400000:8:10003:10; INSTANCE:2]", "{!}") Sleep(1000) ControlSend($hWnd, "", "[CLASS:BCGPToolBar:400000:8:10003:10; INSTANCE:2]", "{a}") Sleep(1000) ControlSend($hWnd, "", "[CLASS:BCGPToolBar:400000:8:10003:10; INSTANCE:2]", "{p}") Sleep(1000) argumentum 1 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