I am still have problems with it instantly recasting the line.
This should be your code+two ConsoleWrite that I added to debug what was going on
Code:
Func pixelscan()
Local $pixel = PixelGetColor($movement[0], $movement[1])
ConsoleWrite("precast pixel changed it is now " & $pixel & @CRLF)
While $fishing
PixelSearch($movement, $movement, $movement, $movement, $pixel, 50)
If @error Then
ConsoleWrite("postcast pixel changed it is now " & $pixel & @CRLF)
Send($fishingkey)
$fischdauer = TimerInit()
Sleep(4000)
EndIf
$pixel = PixelGetColor($movement[0], $movement[1])
$nfilesize_new = FileGetSize($file)
If $nfilesize < $nfilesize_new Then
logscan()
$nfilesize = $nfilesize_new
EndIf
If (TimerDiff($fischdauer) > 25000) Then $fishing = 0
$pixel = PixelGetColor($movement[0], $movement[1])
Sleep(100)
WEnd
EndFunc
Here is the output that I am getting from it
Code:
precast pixel changed it is now 4208432
postcast pixel changed it is now 4208432
precast pixel changed it is now 4208432
postcast pixel changed it is now 4208432
The numbers are the same so the PixelSearch function should not be changing the @error flag but the flag is getting changed anyways.
So, is something causing the @error to trigger that is not PixelSearch? Is that why it keeps trying to recast?