grimmlock Posted May 3, 2013 Author Posted May 3, 2013 _arraydisplay output was 504 rows and one of the rows matched the name of the WinGetHandle Thanks Grimm
jdelaney Posted May 3, 2013 Posted May 3, 2013 (edited) 504!?! how many windows do you have open! Oh, did you not include the title in the winlist? Please ALWAYS post back what you are attempting (the function/script/whatever) so someone can correct it....your responses do not help without us having to ask followups like this one Edited May 3, 2013 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
grimmlock Posted May 3, 2013 Author Posted May 3, 2013 This is what I had $var = WinList() _ArrayDisplay($var, "test") Thanks Grimm Thanks Grimm
grimmlock Posted May 3, 2013 Author Posted May 3, 2013 (edited) As for the console write I placed it here $iYourControlIdentifier = 59392 $hwnd = WinGetHandle("Administration Explorer - System") If IsHwnd($hwnd) Then ConsoleWrite("Found window with hwnd=" & $hwnd & @CRLF) MsgBox(1,1,"verify HWND=[" & $hwnd & "] matches autoit info tool") Else ConsoleWrite("UNABLE to find window handle...you are not using the correct title, or window is not found" & @CRLF) EndIf $hControl = ControlGetHandle($hwnd, "", $iYourControlIdentifier) if IsHWnd($hControl) then ConsoleWrite("ready" & @CRLF) Else MsgBox(1,1,"need to get the control handle correctly") Exit EndIf While IsHWnd($hControl) $value = _GUICtrlButton_GetState($hControl) ConsoleWrite($value) ; <------ Here!!! And all I get is 0000000000....... If BitAND($value, $BST_PUSHED) Then While True $value = _GUICtrlButton_GetState($hControl) If Not BitAND($value, $BST_PUSHED) Then ExitLoop WEnd MsgBox(1,1,"clicked") ;~ ExitLoop EndIf $hControl = ControlGetHandle($hwnd, "", $iYourControlIdentifier) WEndThanks Grimm Edited January 16, 2014 by grimmlock Thanks Grimm
jdelaney Posted May 3, 2013 Posted May 3, 2013 Yep, your application isn't allowing your script access to the state of the control...my sample will not help you. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
grimmlock Posted May 8, 2013 Author Posted May 8, 2013 Morning, I was working on this yesterday and have come to some sort of appiphany. It would appear that the WinGetHandle is looking at the window to be open..is that correct? When I used the Window info tool, it occured to me instead of using the window shouldn't I be using the information under the control tab seeing as though that is where the "Save" button control data is? I tried using ControlGetHandle("Administration Explorer - System -", "", "59392") but that just returns the same 000000000.... on the output. Does any of this make any sense? Thanks Grimm Thanks Grimm
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