GordonFreeman Posted October 18, 2012 Share Posted October 18, 2012 [CLASS:WTL_LISTVIEW; INSTANCE:2] Hi, i need right click on item of a listview -> Select 3 (third) in "Menu of a item of a listview" #RequireAdmin $Total = ControlListView("Window1", "", "[CLASS:WTL_LISTVIEW; INSTANCE:2]", "GetItemCount") For $i = 1 to $Total ControlListView("Window1", "", "[CLASS:WTL_LISTVIEW; INSTANCE:2]", "Select", $i) ControlClick("Window1", "", "[CLASS:WTL_LISTVIEW; INSTANCE:2]", "right", 1) Next But ControlClick only Open the Menu for me. Not click. Some other method? Frabjous Installation Link to comment Share on other sites More sharing options...
FireFox Posted October 18, 2012 Share Posted October 18, 2012 Hi, You can use the _GUICtrlListView_* functions with the listview handle retrieved. #include <GUIListView.au3> Global $hLw = ControlGetHandle("Window1", "", "[CLASS:WTL_LISTVIEW; INSTANCE:2]") _GUICtrlListView_ClickItem($hLw, 2) ;index based 0 Br, FireFox. Link to comment Share on other sites More sharing options...
GordonFreeman Posted October 18, 2012 Author Share Posted October 18, 2012 (edited) Ty man, but i already try it. Not work. The handle is correct but nothing happens. I think it is a more complex listview. With click works but only can open the menu and not click on the third menu item Any idea? I retest and the same thing happened the original script. He opens the "menu item", but not click on anything Edited October 18, 2012 by GordonFreeman Frabjous Installation Link to comment Share on other sites More sharing options...
GordonFreeman Posted October 18, 2012 Author Share Posted October 18, 2012 (edited) Edited October 18, 2012 by GordonFreeman Frabjous Installation Link to comment Share on other sites More sharing options...
FireFox Posted October 19, 2012 Share Posted October 19, 2012 Then it's a menu, not a listview. Test with the _GUICtrlMenu* functions. Br, FireFox. Link to comment Share on other sites More sharing options...
GordonFreeman Posted October 19, 2012 Author Share Posted October 19, 2012 Then it's a menu, not a listview. Test with the _GUICtrlMenu* functions.Br, FireFox.Really, but is a menu of list view (When right click on item listview the menu appears). I try Autoit Windows info in Menu and Get: Frabjous Installation Link to comment Share on other sites More sharing options...
FireFox Posted October 19, 2012 Share Posted October 19, 2012 (edited) Try this : Global $hUltraISOWnd, $aPos, $aRet $hUltraISOWnd = WinGetHandle("UltraISO") $aPos = WinGetPos($hUltraISOWnd) $aRet = DllCall("user32.dll", "int", "WindowFromPoint", "long", $aPos[0] + $aPos[2] - 15, "long", $aPos[1] + 140) ControlClick($hUltraISOWnd, "", $aRet[0], "right", 1, 10, 21 + 10) ControlSend($hUltraISOWnd, "", "", "{DOWN 3}{ENTER}") Br, FireFox. Edited October 19, 2012 by FireFox Link to comment Share on other sites More sharing options...
GordonFreeman Posted October 20, 2012 Author Share Posted October 20, 2012 WOW ty man, works fine Frabjous Installation 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