Method wnd.getwnd.allWindows
Overload
Gets top-level windows.
public static wnd[] allWindows(bool onlyVisible = false, bool sortFirstVisible = false)
Parameters
onlyVisible (bool)
Need only visible windows. Note: this function does not check whether windows are cloaked, as it is rather slow. Use wnd.IsCloaked if need. |
sortFirstVisible (bool)
Place hidden windows at the end of the array.
Not used when onlyVisible is |
Returns
wnd[]
Array containing zero or more wnd. |
Remarks
Calls API EnumWindows. Although undocumented, the API retrieves most windows as in the Z order, however places IME windows (hidden) at the end. See also: wnd.getwnd.allWindowsZorder;
note
The array can be bigger than you expect, because there are many invisible windows, tooltips, etc. See also wnd.getwnd.mainWindows.
Skips message-only windows; use wnd.findFast if need.
On Windows 8 and later may skip Windows Store app Metro-style windows (on Windows 10 few such windows exist). It happens if this program does not have disableWindowFiltering
true
in its manifest and is not uiAccess; to find such windows you can use wnd.findFast.
Tip: To get top-level and child windows in single array: var a = wnd.getwnd.root.Get.Children();
.