automator Posted April 30, 2007 Share Posted April 30, 2007 Another newbie here. I'm really excited with the prospects, but the excitment is tempered with reality: I can't get WinMenuSelectItem to execute a menu item in Acrobat v 8.0. I have tried the WinMenuSelectItem code with both "&File" as well as "File". Neither work. Has anyone come up with a way of running menus in Acrobat v8.0? Here is my code: run("C:\Program Files\Adobe\Acrobat 8.0\Acrobat\Acrobat.exe") WinWaitActive( "Adobe Acrobat Professional") Send( "^o") WinWaitActive( "Open" , "File &name:" ) ControlSend( "Open" , "File &name:" , "Edit1", "H:\Data\Archives\Investing\WmBlair\TLP\Statement TLP Blair 200703.pdf") ControlClick( "Open" , "File &name:" , "Button2" ) WinWaitActive( "Statement TLP Blair 200703.pdf - Adobe Acrobat Professional") WinMenuSelectItem( "Statement TLP Blair 200703.pdf - Adobe Acrobat Professional" , "" , "File" , "Expor&t" , "XML 1.0" ) WinWaitActive( "Save As" , "File &name:" ) ControlClick( "Save As" , "File &name:" , "Button2" ) ; Save with default file name Basically, I am trying to automate opening a pdf and exporting it as XML so I can do further data extraction from it. Here is what I see with AutoIT Window Info when the mouse is on the menu bar: Press CTRL-ALT-F to freeze the display. >>>>>>>>>>>> Window Details <<<<<<<<<<<<< Title: Statement TLP Blair 200703.pdf - Adobe Acrobat Professional Class: AcrobatSDIWindow Size: X: -1 Y: 2 W: 507 H: 733 >>>>>>>>>>> Mouse Details <<<<<<<<<<< Screen: X: 199 Y: 34 Cursor ID: 2 >>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<< RGB: Hex: 0xDE6B0E Dec: 14576398 >>>>>>>>>>> Control Under Mouse <<<<<<<<<<< Size: Control ID: ClassNameNN: Text: >>>>>>>>>>> Status Bar Text <<<<<<<<<<< >>>>>>>>>>> Visible Window Text <<<<<<<<<<< AVToolBarHostView AVInternalDocumentView AVSplitterView AVDocumentWrapperView AVTableContainerView AVTabStripView AVTabStripView AVSplitterView AVSplitationPageView AVSplitterView AVScrolledPageView AVScrollView AVTableContainerView 11.00 x 8.50 in AVSplitterDragView AVPageView AVToolBarEasel AVToolBarEasel AVToolBarEasel AVToolBarEasel AVToolBarEasel 41% 1 >>>>>>>>>>> Hidden Window Text <<<<<<<<<<< AVDockableHostView AVDockableHostView AVDockableHostView AVDockableHostView AVRulerView AVRulerView AVNullDocView Link to comment Share on other sites More sharing options...
Zedna Posted April 30, 2007 Share Posted April 30, 2007 If WinMenuSelectItem() is not working then it's probably non-standard (ala Microsoft) menu which is in fact Toolbar control.Search forum there are some posts about that (ToolBar and menu).As I can remember in Auto3Lib is some example about that too. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
automator Posted May 1, 2007 Author Share Posted May 1, 2007 If WinMenuSelectItem() is not working then it's probably non-standard (ala Microsoft) menu which is in fact Toolbar control.Search forum there are some posts about that (ToolBar and menu).As I can remember in Auto3Lib is some example about that too.Solution found: Replace WinMenuSelectItem with send( "keys" )Send( "{ALT down}ft{ALT up}{DOWN 2}{ENTER}" ) ; File >> Export >> XML 1.0Note: I tried the following first, but releasing the ALT key between ALT-f and ALT-t doesn;t work.Send( "!f!t{DOWN 2}{ENTER}" ) ; File >> Export >> XML 1.0 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