Hello. In my script I find that using the following code runs eternally because @error is always 0 even when it shouldn't be.
Func test()
Local $t = 90, $c = 0, $ps
Do
$ps = PixelSearch(570, $t, 590, $t + 15, 0xCCD0D6, 15, 1, $Hwnd)
MsgBox(0, "test", IsArray($ps) & ", " & "error = " & @error, 0, $Hwnd)
If (@error = 0) Then
$t += 25
$c += 1
EndIf
Sleep(100)
MsgBox(0, "test", "error = " & @error, 0, $eveHwnd)
Until @error = 1
Return $c
EndFunc
The message box shows me that PixelSearch found something 4 times; but after that, isArray returns false but @error is also 0. This doesn't happen with a While...Wend loop.
Any thoughts?