ChiGGz Posted January 14, 2008 Share Posted January 14, 2008 I've searched exhaustively and now resort to the kind members! I'm doing regressive testing for my company product and wish to use AutoIt. Apparently the menus are of non-standard design so I can't obtain a ID. I read that Auto3Lib can be used. And that it is prepackaged....(currently using AutoIt 3.2.10.0) I don't see it, after doing the reg patch I installed Auto3Lib and now I'm getting a constants error trying to run the samples. Problem after problem! #1. Is there a built in alternative (non manual mouse X,Y) to WinMenuSelectItem. #2. Is Auto3Lib built into the latest version (3.2.10.0) Thank-you for your support! Link to comment Share on other sites More sharing options...
GaryFrost Posted January 14, 2008 Share Posted January 14, 2008 User Defined Functions GuiMenu Management in the help SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Zedna Posted January 15, 2008 Share Posted January 15, 2008 #2. Is Auto3Lib built into the latest version (3.2.10.0)Whole Auto3Library functionality was ported into standard UDFs in AutoIt version 3.2.10 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
ChiGGz Posted January 15, 2008 Author Share Posted January 15, 2008 User Defined FunctionsGuiMenu Managementin the helpThanks for your input.But its to my understanding that the GuiMenu Management functions are for creating your own custom GUI. In my case I'm looking to specifically invoke a certain GUI option from a third party application.If I'm wrong can you point me specifically to the function that is similiar to WinMenuSelectItem?Thanks alot Link to comment Share on other sites More sharing options...
Zedna Posted January 15, 2008 Share Posted January 15, 2008 Thanks for your input.But its to my understanding that the GuiMenu Management functions are for creating your own custom GUI. In my case I'm looking to specifically invoke a certain GUI option from a third party application.If I'm wrong can you point me specifically to the function that is similiar to WinMenuSelectItem?Thanks alotDon't worry. GUIMenu UDF is also for manipulating menus in external applications.Look at _GUICtrlMenu_TrackPopupMenu() _GUICtrlMenu_FindItem() and also other functions there. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
ChiGGz Posted January 15, 2008 Author Share Posted January 15, 2008 (edited) Don't worry. GUIMenu UDF is also for manipulating menus in external applications.Look at _GUICtrlMenu_TrackPopupMenu() _GUICtrlMenu_FindItem() and also other functions there.I notice that there is a parameter $hWnd What is the getter function for this parameter?EDIT: ControlGetHandle seems to be the function for that if I'm not mistaken Edited January 15, 2008 by ChiGGz Link to comment Share on other sites More sharing options...
ChiGGz Posted January 15, 2008 Author Share Posted January 15, 2008 (edited) $hWnd = ControlGetHandle("VPN Manager","",590778) $hMenu = _GUICtrlMenu_GetMenu($hWnd) $test = _GUICtrlMenu_FindItem($hMenu,"About", False,0) MsgBox(0,"VPN Manager",$hMenu) It would seem that $hWnd and $hMenu have the same values. 0x000903BA This must be wrong... The $test returns -1. Not 0 as per the help file for failure. Edited January 15, 2008 by ChiGGz Link to comment Share on other sites More sharing options...
GEOSoft Posted January 15, 2008 Share Posted January 15, 2008 $hWnd = ControlGetHandle("VPN Manager","",590778) $hMenu = _GUICtrlMenu_GetMenu($hWnd) $test = _GUICtrlMenu_FindItem($hMenu,"About", False,0) MsgBox(0,"VPN Manager",$hMenu) It would seem that $hWnd and $hMenu have the same values. 0x000903BA This must be wrong... The $test returns -1. Not 0 as per the help file for failure.Try WinGetHandle() George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
ChiGGz Posted January 15, 2008 Author Share Posted January 15, 2008 Try WinGetHandle() Hi GEOSoft. I've tried the following now. #Include <GuiMenu.au3> WinActivate("VPN Manager") Sleep(1000) $hWnd = WinGetHandle("VPN Manager") $hMenu = _GUICtrlMenu_GetMenu($hWnd) MsgBox(0,"VPN Manager",$hMenu) $hWnd returns 0x000403A6 but $hMenu returns 0x00000000 does this mean $hMenu does not exist for this app or am I using the wrong syntax? Thanks Link to comment Share on other sites More sharing options...
LarryDalooza Posted January 15, 2008 Share Posted January 15, 2008 (edited) You mentioned yourself that the menus are "non-standard" ... so ... don't use menu commands ... they won't work... Best chance is to ControlSend keystrokes directly to the control... Lar. p.s. to the people that are trying to help ... read carefully ... please. Edited January 15, 2008 by LarryDalooza AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
Zedna Posted January 16, 2008 Share Posted January 16, 2008 (edited) Larry is right. If WinMenuSelectItem doesn't work then also menu API functions will not work. If your menus are in Office like style then you may try ToolBar UDF. I saw some scripts for manipulating such Microsoft's modern menus by using ToolBars API functions. I think nice examples for that were in Auto3Library but I'm not 100%. sure about that. Edited January 16, 2008 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search 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