Jump to content

Recommended Posts

Posted

I am a bit confused by the difference between WinList() Vs _WinAPI_EnumWindowsTop (). According to the manual WinList() without any arguments will be: "If no title and text is given then all top-level windows are returned." and _WinAPI_EnumWindowsTop () will enumerates all top-level windows. These two sound the same to me but when I tried, WinList() return more things then _WinAPI_EnumWindowsTop () with something I have no idea what they are:

winapi()
testWinList()
Func winapi()
 Local $winArr
  ;$winArr = _WinAPI_EnumWindowsPopup()
 $winArr = _WinAPI_EnumWindowsTop ()
 For $i = 1 To $winArr[0][0]
  alert(WinGetTitle($winArr[$i][0]))
 Next
EndFunc 

Func testWinList()
  Local $winArr = WinList()
  For $i = 1 To $winArr[0][0]
  alert($winArr[$i][0])
 Next 
EndFunc

The 2nd function return a lot more things like CiceroUIWndFrame/SysFader and a lot of blank titles!

Posted (edited)

Looking briefly at the source for both I'd tend to say the difference is that WinList returns EVERY top level window where as _WinAPI_EnumWindowsTop () only returns the visible ones.

In particular line 1992 of WinAPI.au3 (V3.3.0.0):

If _WinAPI_IsWindowVisible($hWnd) Then _WinAPI_EnumWindowsAdd($hWnd)

vs

line 304 of script_win.cpp (V3.1.0):

Win_WindowSearchAddToList(m_WindowSearchHWND);
Edited by evilertoaster

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