Jump to content

Find classes


Recommended Posts

  • Moderators

@hiepkhachsg you need to be a bit more specific in your request. If you want to find control and class names you would use the Window Info Tool located in the same directory where you installed AutoIt. How about a detailed example of the window, and what information you're trying to get - help us help you ;)

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

I mean that a function (not W.I.T.) to find a class at a point in the window. I can find what classes have area containing that point but, when it have many layer classes (more than 2 classes) at that point, i don't know what class is the top level layer of displaying (it mean this class will take effect when you click or press a key).

Edited by hiepkhachsg
Link to comment
Share on other sites

?

#include <WinAPI.au3>

HotKeySet("{ESC}", "_exit") 
Global $g_tStruct = DllStructCreate($tagPOINT) 

While 1
    DllStructSetData($g_tStruct, "x", MouseGetPos(0))
    DllStructSetData($g_tStruct, "y", MouseGetPos(1))
    ToolTip(_WinAPI_GetClassName(_WinAPI_WindowFromPoint($g_tStruct)))
    Sleep(100)
WEnd

Func _exit()
    Exit
EndFunc

 

Link to comment
Share on other sites

Thank mikell. I known that, but it use for a window (or point) is displayed on screen. I want to find in window which is hidden behind the others. I stuck when there are many class layers at a point, how to know what class is on top?

Link to comment
Share on other sites

Thank junkew, i've seen your example but it do not solve my problem, you may misunderstand my matter. For example, at a point in the window (of a program) i found 3 classes, with 3 classes containing that point i want to know what a class is on top of displaying !?

Edited by hiepkhachsg
Link to comment
Share on other sites

Treewalker normally can handle that if you check the boundaries of each traversed window in the three. Simplespy will learn you the windowfrompoint function to give you the class on top. Studying sources from WINE for windowfrompoint will teach you how travrrsing tree work.

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