Jump to content

[Closed] Why AutoIt Window Info Tool and Spy++ show different Data for this Control?


Recommended Posts

Hello

If you goto IE7,

Menu: Tools\Manage Add-ons\Enable or Disable Add-ons...

You have in this window in the middle, a ListView.

If you use AutoIt Window Info on it, the Class for the Listview there will be shown as "Static".

If you use Spy++ on it, the Class for the Listview there will be shown as "SysListView32".

Why is that?

2 Window Info Tools, pointing at the same Window and same Control, give different results?

post-45260-1236186743_thumb.png

Edited by Zohar
Link to comment
Share on other sites

Hello

If you goto IE7,

Menu: Tools\Manage Add-ons\Enable or Disable Add-ons...

You have in this window in the middle, a ListView.

If you use AutoIt Window Info on it, the Class for the Listview there will be shown as "Static".

If you use Spy++ on it, the Class for the Listview there will be shown as "SysListView32".

Why is that?

2 Window Info Tools, pointing at the same Window and same Control, give different results?

Where did you get the handle 0x00220922 that was manually entered in Spy++ from?

:P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

I didn't "get" it.. :P

I simply dragged the "Find Window" cursor, and pointed at the listview.

that's exactly what I did in both programs.

the identification process was the same.

but the result varies between the 2 applications...

you can see it yourself, if you have IE7.

Edited by Zohar
Link to comment
Share on other sites

I didn't "get" it.. :unsure:

I simply dragged the "Find Window" cursor, and pointed at the listview.

that's exactly what I did in both programs.

the identification process was the same.

but the result varies between the 2 applications...

you can see it yourself, if you have IE7.

The same control has two different handles...?

:P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

you ask me?

I ask this:)

BTW..

I can assume, that the ListView is composed of a SysHeader+a Frame("Static').

It seems that Spy++ sees it as a ListView,

and AutoIt Window Info sees it as the Parts that compose the ListView.

as if AutoIt Window Info is able to "break" the control to its parts..

(altho both tools see the SysHeader.. not just AutoIt Window Info)

so, because AutoIt Window Info sees the Frame control(Static), it shows its handle,

and because Spy++ doesn't see the composing Frame(Static), it shows the handle to the whole ListView.

(that is my assumption.. and I still don't understand why AutoIt Window Info breaks the control to its parts)

Edited by Zohar
Link to comment
Share on other sites

you ask me?

I ask this:)

BTW..

I can assume, that the ListView is composed of a SysHeader+a Frame("Static').

It seems that Spy++ sees it as a ListView,

and AutoIt Window Info sees it as the Parts that compose the ListView.

as if AutoIt Window Info is able to "break" the control to its parts..

(altho both tools see the SysHeader.. not just AutoIt Window Info)

so, because AutoIt Window Info sees the Frame control(Static), it shows its handle,

and because Spy++ doesn't see the composing Frame(Static), it shows the handle to the whole ListView.

(that is my assumption.. and I still don't understand why AutoIt Window Info breaks the control to its parts)

I don't know that there is a parent/child relationship to the controls, but they do overlap exactly on the screenspace. AU3Info.exe has never been able to drill down into stacked controls at the same coordinates. This demo shows the overlap in that dialog:
#include <Array.au3>

Global $avControls[1][6] = [[0, "Handle", "X", "Y", "W", "H"]]
Global $hWin = WinGetHandle("[CLASS:#32770; TITLE:Manage Add-ons]")
ConsoleWrite("$hWIN = " & $hWin & @LF)
Global $avClasses = StringSplit(WinGetClassList($hWin), @LF, 1)
For $n = UBound($avClasses) - 1 To 1 Step -1
    If StringStripWS($avClasses[$n], 8) = "" Then _ArrayDelete($avClasses, $n)
Next
$avClasses = _ArrayUnique($avClasses, 1, 1)

For $n = 1 To UBound($avClasses) - 1
    For $i = 1 To 99
        $sControl = "[CLASS:" & $avClasses[$n] & "; INSTANCE:" & $i & "]"
        $hTemp = ControlGetHandle($hWin, "", $sControl)
        If Not @error Then
            ReDim $avControls[UBound($avControls) + 1][6]
            $avControls[0][0] = UBound($avControls) - 1
            $avControls[$avControls[0][0]][0] = $sControl; ClassNameNN
            $avControls[$avControls[0][0]][1] = $hTemp; hWnd
            $avPos = ControlGetPos($hWin, "", $sControl)
            $avControls[$avControls[0][0]][2] = $avPos[0]; X
            $avControls[$avControls[0][0]][3] = $avPos[1]; Y
            $avControls[$avControls[0][0]][4] = $avPos[2]; W
            $avControls[$avControls[0][0]][5] = $avPos[3]; H
        EndIf
    Next
Next

_ArrayDisplay($avControls, "$avControls")

:P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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