Protocoder Posted May 16, 2011 Share Posted May 16, 2011 Hi Experts, I have to automate a third party application i need to do the following, i need your help with commands. 1. I need to go to particular menu item of the application located in Horizontal top panel. 2. Once i do step 1, i need to traverse down to desired location based on the user input. None of the menu items have short cut keys. Thanks in Advance Thanks and Best Regards Protocoder Link to comment Share on other sites More sharing options...
shreeks Posted May 16, 2011 Share Posted May 16, 2011 Could you please share the snapshot of this application? For query 1, Were you able to find "Control ID" of the menu item using AutoIt Window Info tool? Learning is Lifelong! Link to comment Share on other sites More sharing options...
fett8802 Posted May 16, 2011 Share Posted May 16, 2011 (edited) Hi Experts,I have to automate a third party application i need to do the following, i need your help with commands.1. I need to go to particular menu item of the application located in Horizontal top panel.2. Once i do step 1, i need to traverse down to desired location based on the user input. None of the menu items have short cut keys. Thanks in Advance Thanks and Best RegardsProtocoderIn the UDF I wrote, is a function called "_ClickMenu". I wrote it due to the need to do exactly as you are describing. It can click across most horizontal menus (it was written for XP size menus) and includes variances for "separator" lines and can even do sub-menus and sub-sub-menus. You can download the UDF by clicking the link in my signature. If it works for you, I'd really appreciate a comment in the UDF thread! Hopefully it will do what you need. If you have any questions about the function, let me know. There are several other, very useful functions in the UDF.-FettP.S. It can be found here: Edited May 16, 2011 by fett8802 [sub]My UDF[/sub][sub] - Basics and Time extensions. Great for those new at AutoIt, also contains some powerful time extensions for pros.[/sub][sub]ScrabbleIt[/sub][sub] - Scrabble done in pure AutoIt. (In Progress)[/sub][sub]Nerd Party Extreme | My Portfolio | [email="fett8802@gmail.com"]Contact Me[/email][/sub] Link to comment Share on other sites More sharing options...
Protocoder Posted May 16, 2011 Author Share Posted May 16, 2011 (edited) Thank you Shreeks and fett8802. I have enclosed the snapshot. This application main window is on the left, CNTL+F8 Gets the "Query Details" window. I need to click "Choose Item Type" button, and traverse down the list to choose the input the user gives at the command line (example Feature, DERIVED REQMT, etc). Once query type above selected, the second parameter input as provided by the user is the fed as input in the "Identity" item. then press enter. Example: XXYY.exe Feature, FN1231232 So it runs the executable taking first input Feature as "query type" and feeds in "Identity" FN1231232... Hi fett8802, Do you think if i take "_ClickMenu" function, will that help me in this. I will try later today. Any help in above is really appreciated. PS: I have enclosed the Windows Info of the menu item. Thanks and Regards -Protocoder. Edited May 16, 2011 by Protocoder Link to comment Share on other sites More sharing options...
Protocoder Posted May 19, 2011 Author Share Posted May 19, 2011 Have i missed some thing very obvious? Please can some one help me. I could not get this right. Thank you Link to comment Share on other sites More sharing options...
fett8802 Posted May 20, 2011 Share Posted May 20, 2011 Have i missed some thing very obvious? Please can some one help me. I could not get this right. Thank youDid you try the _ClickMenu function? Here's an example:In FireFox4, the code to click View -> Zoom -> Reset is this:_ClickMenu("Window Title",2,3,1,3,1)That clicks main item 2 (File|Edit|View -- File is 0, Edit is 1, View is 2) then clicks sub-menu item 3 (Toolbar, Sidebar, Spacer, Zoom -- Toolbar is 1, Sidebar is 2, spacer does not count, Zoom is 3) and takes 1 spacer into account, then clicks the sub-sub item 3 (Zoom In, Zoom Out, spacer, Reset -- same style) and accounts for 1 spacer.Give this function a try!-Fett [sub]My UDF[/sub][sub] - Basics and Time extensions. Great for those new at AutoIt, also contains some powerful time extensions for pros.[/sub][sub]ScrabbleIt[/sub][sub] - Scrabble done in pure AutoIt. (In Progress)[/sub][sub]Nerd Party Extreme | My Portfolio | [email="fett8802@gmail.com"]Contact Me[/email][/sub] Link to comment Share on other sites More sharing options...
Zedna Posted May 21, 2011 Share Posted May 21, 2011 If it's standard main menu then you can use WinMenuSelectItem() Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
junkew Posted May 22, 2011 Share Posted May 22, 2011 with the information in this thread you can also find out a lot if AutoIT default functions are not enough FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
Protocoder Posted May 23, 2011 Author Share Posted May 23, 2011 Thank you All. Fret: I have tried your _ClickMenu() for a notepad application. It is brilliant.. However Please have a look at the screen shot, The child window "Query Details" has a "Choose Item Type" button to open up a menu which has no short cut keys except click on the list of options. Unfortunately _clickMenu isn't working. Zedna: I tried WinMenuSelectItem too, but as you have pointed out, this is not the main menu window. junkew: I been to the links and notice you got some incredible problem solved but i need help in using that feature in my program. PS: I would like to take the user input and go down that many options to select a menu. Any help is appreciated. 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