Jump to content

Recommended Posts

Posted (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 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.
Posted (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)
WEnd

Thanks

Grimm

Edited by grimmlock

Thanks

Grimm

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...