Hypertrophy Posted July 11, 2009 Posted July 11, 2009 I've been using this tool for a while to gather data on many controls and it's always worked until now. I just started a poker software client that in the past, I easily got control ID's,classnames,etc from the buttons and various controls. Now I cant get anything off of the entire client. What do you guys think they did to block info tools like this from getting data? And is there a way to get around this?
Bert Posted July 11, 2009 Posted July 11, 2009 Right click on the window. Odds are it is built in flash. If it is, you can only do mouse clicks. The Vollatran project My blog: http://www.vollysinterestingshit.com/
Hypertrophy Posted July 14, 2009 Author Posted July 14, 2009 Well, when I do that they have a custom menu that pops up. But if you're right then any ideas how to get around it? Anyone else have any suggestions?
bo8ster Posted July 17, 2009 Posted July 17, 2009 post what the info tool does give. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]
Hypertrophy Posted July 17, 2009 Author Posted July 17, 2009 (edited) >>>> Window <<<< Title: Gives title but hiding it for confidentiality Class: QWidget Position: 43, 53 Size: 908, 651 Style: 0x16CF0000 ExStyle: 0x00000100 Handle: 0x000D031E >>>> Control <<<< Class: Instance: ClassnameNN: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: 0x000D0336 >>>> Mouse <<<< Position: 312, 235 Cursor ID: 0 Color: 0x077F17 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<< Edited July 17, 2009 by Hypertrophy
bo8ster Posted July 17, 2009 Posted July 17, 2009 Well looks like it is Qt, http://doc.trolltech.com/3.3/qwidget.html. I haven't played with QT so I can't really comment much about it, you might want to search the forum. It has a handle so it has properties but they may not been seen by windows. Use the Control Handle under mouse in my sig over the controls. It uses dll calls to get the info and it should at least give you the handle real time. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]
Hypertrophy Posted July 17, 2009 Author Posted July 17, 2009 It like freezes when I move it on the window and just shows whatever control info was last seen. I know there has to be some way to get around it.
bo8ster Posted July 17, 2009 Posted July 17, 2009 You need to use the script maximized. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]
Hypertrophy Posted July 17, 2009 Author Posted July 17, 2009 (edited) how do i use it maximized? there's no gui. edit: no doubt it works on other windows but the window im having a problem with thats when it freezes. Edited July 17, 2009 by Hypertrophy
bo8ster Posted July 17, 2009 Posted July 17, 2009 run my script, then maximize the window you want to get the info from. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]
Hypertrophy Posted July 17, 2009 Author Posted July 17, 2009 Here's what I got off the whole window: Handle: 0x001E015E Class: QWidget ClassNN: ID: 0 Mouse X Pos: 290 Mouse Y Pos: 516 Parent Hwnd: 0x001E015E
Hypertrophy Posted July 18, 2009 Author Posted July 18, 2009 Is there some way to use QWidget to my advantage so I can regain control handles, id's etc. of the application using them? It seems some people may be doing it.
bo8ster Posted July 19, 2009 Posted July 19, 2009 I have not seen QT used with AutoIt before so I have no idea. On method I use for difficult controls is to move the mouse over the control then run _Mouse_Control_GetInfo() (from my script) to get the handle, then use it in Control functions. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]
Hypertrophy Posted July 21, 2009 Author Posted July 21, 2009 I don't understand. I thought that's what your script was doing in the first place when I was holding my mouse over a control.
bo8ster Posted July 21, 2009 Posted July 21, 2009 Put in your scriptMouseMove$array = _Mouse_Control_GetInfo()Get info from array.This will give you the control handle. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]
Hypertrophy Posted July 22, 2009 Author Posted July 22, 2009 its not working. i have it move the mouse over a button but its getting the handle for the window. i need something like the control id for the button. expandcollapse popupMouseMove(650,541,0) $array = _Mouse_Control_GetInfo() While 1 ToolTip("Handle = " & $array[0]) Wend Func _Mouse_Control_GetInfo() $appHandle = GetHoveredHwnd() ; Uses the mouse to do the equivalent of WinGetHandle() Local $client_mpos = MouseGetPos() ; gets client coords because of "MouseCoordMode" = 2 ConsoleWrite("AppHandle is : " & $appHandle & @LF) Local $a_mpos = _ClientToScreen($appHandle, $client_mpos[0], $client_mpos[1]) ; $a_mpos now screen coords If @error Then Return SetError(1, 0, 0) Local $a_wfp = DllCall("user32.dll", "hwnd", "WindowFromPoint", "long", $a_mpos[0], "long", $a_mpos[1]) If @error Then Return SetError(2, 0, 0) Local $t_class = DllStructCreate("char[260]") DllCall("User32.dll", "int", "GetClassName", "hwnd", $a_wfp[0], "ptr", DllStructGetPtr($t_class), "int", 260) Local $a_ret[4] = [$a_wfp[0], DllStructGetData($t_class, 1), $a_mpos[0], $a_mpos[1]] Return $a_ret EndFunc ;==>_Mouse_Control_GetInfo Func _ClientToScreen($h_wnd, $i_x, $i_y) ;~ ConsoleWrite("Client here, " & $i_x & "," & $i_y & @CRLF) Local $t_point = DllStructCreate("int;int") DllStructSetData($t_point, 1, $i_x) DllStructSetData($t_point, 2, $i_y) DllCall("user32.dll", "int", "ClientToScreen", "hwnd", $h_wnd, "ptr", DllStructGetPtr($t_point)) Local $a_ret[2] = [DllStructGetData($t_point, 1), DllStructGetData($t_point, 2)] ;~ ConsoleWrite("Screen here, " & $a_ret[0] & "," & $a_ret[1] & @CRLF) Return $a_ret EndFunc ;==>_ClientToScreen ; =============================================================================== ; Retrieves the Handle of GUI/Application the mouse is over. ; Similar to WinGetHandle except it used the current mouse position (Client Coords) ; Taken from http://www.autoitscript.com/forum/index.php?showtopic=444962 ; =============================================================================== Func GetHoveredHwnd() Local $iRet = DllCall("user32.dll", "int", "WindowFromPoint", "long", MouseGetPos(), "long", MouseGetPos()) If IsArray($iRet) Then $appHandle = $iRet[0] Return HWnd($iRet[0]) Else Return SetError(1, 0, 0) EndIf EndFunc ;==>GetHoveredHwnd
bo8ster Posted July 22, 2009 Posted July 22, 2009 I see that it is getting a handle but it is getting the handle at (650,541) once and then never updating the tool tip. You need to have the window active before you run it or you will always get Scite. Try doing While 1 $array = _Mouse_Control_GetInfo() ToolTip("Handle = " & $array[0]) Wend Also remember this works on client coords not the default. So when you work out your mouse coords in the info tool, the Coord Mode needs to be on Client in the options. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]
Hypertrophy Posted July 22, 2009 Author Posted July 22, 2009 No, its not getting Scites It is getting the windows handle i know for a fact. also as i said they have this window locked down (which im trying to get around) so i cant even use the info tool to get the client coords. but i knew this so i put the window in the 0,0 coords on the monitor. i really think that your tool cant get past the QWidget which i the key to getting controlID's
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