Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Array.au3>
- #include <Process.au3>
- GUICreate("Test1", 100, 100)
- GUICreate("Test2", 100, 100)
- GUICreate("Test3", 100, 100)
- GUICreate("Test4", 100, 100)
- GUISetState()
- $aResult = _ProcessGetWindows("Autoit3.exe")
- _ArrayDisplay($aResult)
- Func _ProcessGetWindows($sProcessName)
- $aWinList = WinList()
- $sWindowsFound = ""
- For $i = 1 To $aWinList[0][0]
- If _ProcessGetName(WinGetProcess($aWinList[$i][0])) = $sProcessName And $aWinList[$i][0] <> "" Then $sWindowsFound &= $aWinList[$i][0] & '|'
- Next
- If $sWindowsFound = "" Then Return -1
- Return StringSplit(StringTrimRight($sWindowsFound, 1), "|", 2)
- EndFunc ;==>_ProcessGetWindows
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement