WinGetPIDList

Return Array of PIDs for matching windows.

OutputVar := WinGetPIDList(WinTitle, WinText, ExcludeTitle, ExcludeText)
Function Example: PIDList := WinGetPIDList("ahk_class AutoHotkey")

Parameters

OutputVar

The name of the variable in which to store the Array containing found PIDs or empty array if nothing was found.

WinTitle (optional)

A window title or other criteria identifying the target window. You can pass an Array where first item is the Window criteria and second item determines whether invisible windows are considered.
E.g. WinGetPIDList(["ahk_class AutoHotkey",true]) to consider hidden windows too.

WinText (optional)

If present, this parameter must be a sub string from a single text element of the target window.
You can pass an Array where first item is the WindowText and second item determines whether invisible text is found.
E.g. WinGetPIDList(["ahk_class AutoHotkey",1],["Some text",true]) to consider hidden text too.

ExcludeTitle (optional)

Windows whose titles include this value will not be considered.

ExcludeText (optional)

Windows whose text include this value will not be considered.

Examples

for ,v in WinGetPIDList(["ahk_class AutoHotkey",true])
  MsgBox v