F2 if isDialogOpen number count line for in GetDialogLines if RegExMat

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
F2::
{
if (isDialogOpen() = 1)
{
number := 0, count := 0, line := 0
for k, v in GetDialogLines()
if (RegExMatch(v, "^(\d+)\s+(\d+) кг\.", out)
if (out2 > count && count >= 5000)
number := out1, count := out2, line := A_Index
if (line)
{
SetDialogIndex(line)
addChatMessage("number: " number ", count: " count
}
else
setrestart()
}
}
return