Hi everyone, this is not really a question. I wanted to share a small function that I found useful.

QARun has a function to attach to a window of a different z-order, but if you want to find the window handle of such a window without attaching to it, the following works quite well.

Kind regards,

</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">; retrieve the handle of a window with specific z-order
; specify handle of parent to retrieve its children by z-order
; leave classname or wintitle blank to make the search less specific
; author: Misha Verplak
Function get_win_z(h_parent, classname, wintitle, zorder) :Var
var h, zcount
h = 0
zcount = 0
zcount += 1
h = FindWindowEx(h_parent, h, classname, wintitle)
until zcount = zorder or h = 0
return h
End Function ; get_win_z

; sample script, shows handle of two open notepad windows
Function Main
hwnd = get_win_z(0, &quot;Notepad&quot;, &quot;Untitled - Notepad&quot;, 0)
msgbox(&quot;hwnd z0&quot;, hwnd)
hwnd = get_win_z(0, &quot;Notepad&quot;, &quot;Untitled - Notepad&quot;, 1)
msgbox(&quot;hwnd z1&quot;, hwnd)
End Function</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">