Jump to content
Sign in to follow this  

How would you get handle of window if ALL YOU HAVE IS..

Recommended Posts


.. a classname that is same as alot of generic windows inside windows system, you have no title, you have no any visible text...Here is what i am trying to do atm

#include <Array.au3>

#include <Array.au3>

Dim $windows_searched[10] ;Make array as big as windows you need to find
$arrayposition = 0

$lista = WinList("[CLASS:tooltips_class32]")
_ArrayDisplay($lista, "Have " & $lista[0][0] & " Windows that exist")

For $wnd = 1 To $lista[0][0] -1
    $text = WinGetClassList($lista[$wnd][1])
    If (StringInStr($text, "VBFloatingPalette")) = 1 Then
        $windows_searched[$arrayposition] = $lista[$wnd][1]
        $arrayposition += 1
        MsgBox(0, "Window Found", "Pointer: "&$lista[$wnd][1] &" With Searched Classes: "&$text)

Here i am trying to iterate them and assign the one i need depending what child-classes it contains, but guess what

this iteration works only if i use the title as parameter in the WinGetClassList but every title from every handle is empty so it just keeps retrieving the same handle classlist.

So if i would use $text = WinGetClassList($lista[$wnd][0]) instead, it would always read the class list from the first window that it finds with empty title.

Actually it works, i was wrong(alot of classlists are actually empty so this confused me), if you need a way to get a handle to a window like this feel free to use this example.

edit: modified code to make it all done...

Edited by marko29

Share this post

Link to post
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
Sign in to follow this