Jump to content

Recommended Posts

Posted

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?

Posted

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]

Posted (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 by Hypertrophy
Posted

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]

Posted

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]

Posted (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 by Hypertrophy
Posted

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]

Posted

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.

Posted

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]

Posted

Put in your script

MouseMove

$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]

Posted

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.

MouseMove(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
Posted

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]

Posted

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

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...