$asd = FileOpen("vsykina.txt", 1)
Dim $StX[2][1] = [[465], [545]]
Dim $StY[2][1] = [[102], [117]]
While 1
ClipPut("Ошибка!")
$title = WinGetHandle("abvgdeika")
WinActivate($title)
WinWaitActive($title)
$hWnd = WinGetHandle('[TITLE:ABBYY Screenshot Reader; CLASS:#32770]')
If BitAND(WinGetState($hWnd), 2) Then
WinActivate($hWnd)
EndIf
ControlClick($hWnd, '', 'Button1')
$size = WinGetPos($title)
BlockInput(1)
MouseMove($size[0] + $StX[0][0], $size[1] + $StY[0][0], 3)
MouseDown("left")
MouseMove($size[0] + $StX[1][0], $size[1] + $StY[1][0], 3)
MouseUp("left")
BlockInput(0)
$bufer = ClipGet()
$schetchik = 0
While $bufer = "Ошибка!"
Sleep(200)
$bufer = ClipGet()
$_number = StringStripWS($bufer, 8)
$bufer = StringReplace($_number, ',', '.')
$bufer += 0
If $bufer = 0 Then $bufer = ClipGet()
$PrNuber = IsNumber($bufer)
$schetchik +=1
If $schetchik > 20 Then
$bufer = "Ошибка по счетчику!"
ExitLoop
ElseIf $bufer = "barabas" Then
$bufer = 0
ExitLoop
ElseIf $bufer <> "Ошибка!" And $PrNuber = 0 Then
$bufer = "Ошибка по строке!"
ExitLoop
EndIf
WEnd
MsgBox (0, '123', $bufer, 3)
FileWrite($asd, $bufer & @CRLF)
WEnd
FileClose($asd)
HotKeySet("e", "Exit")