AHK

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#Persistent
#SingleInstance FORCE
#MaxThreads
#MaxHotkeysPerInterval 200
SetBatchLines, -1
SetWorkingDir %A_ScriptDir%
#NoEnv
global ids := []
global count := 0
WinGet, processList, list,,, Program Manager
Loop, % processList
{
thisId := processList%A_Index%
WinGetClass, this_class, ahk_id %thisId%
if (this_class != "TargemWindow")
Continue
WinActivate, % "ahk_id " thisId
WinGetTitle, this_title, % "ahk_id " thisId
MsgBox, 0x40003, % "Обход всех окон | " a_index " из " processList, % "ahk_id`t`t" thisId "`nahk_class`t`t" this_class "`ntitle:`t`t" this_title "`n`nДа `t- для выбора первого окна`nНет `t- для выбора второго окна`nОтмена `t- для пропуска"
IfMsgBox, Yes
ids[1] := thisId
IfMsgBox, No
ids[2] := thisId
IfMsgBox, Cancel
Continue
}
if (!ids[1] && !ids[2])
{
msgbox, % "Not found"
ExitApp
}
return