#include <WinAPIEx.au3>
#include <Array.au3>
$aWindows=_WinAPI_EnumProcessWindows (ProcessExists("notepad.exe"),1) ; 1 - Enumerate only visible windows. (Default), 0 - Enumerate all windows.
If IsArray($aWindows) Then
_ArrayDisplay($aWindows)
Else
MsgBox(0,'',"процесс не имеет окон")
EndIf