#include <Misc.au3>
HotKeySet('{`}','_exit')
#Region Опрос
MsgBox(0,'Настройка','Наведите мышь на БИРЮЗОВЫЙ цвет на кнопке')
Do
$pos = MouseGetPos()
ToolTip('Пробел для приминения ' & $pos[0] & '.' & $pos[1])
Until _IsPressed(20)
MsgBox(0,'Настройка','Наведите мышь на Точку 1')
Do
$pos2 = MouseGetPos()
ToolTip('Пробел для приминения ' & $pos2[0] & '.' & $pos2[1])
Until _IsPressed(20)
MsgBox(0,'Настройка','Наведите мышь на Точку 2')
Do
$pos3 = MouseGetPos()
ToolTip('Пробел для приминения ' & $pos3[0] & '.' & $pos3[1])
Until _IsPressed(20)
MsgBox(0,'Настройка','Наведите мышь на красную зону клавиши отмена в окне процеса рыбалки')
Do
$pos4 = MouseGetPos()
ToolTip('Пробел для приминения ' & $pos4[0] & '.' & $pos4[1])
Until _IsPressed(20)
#EndRegion Опрос
Отладка, Удалить эту строку при необходимости
$color = '0x03D115'
$color2 = PixelGetColor($pos[0],$pos[1])
$color3 = PixelGetColor($pos4[0],$pos4[1])
MsgBox(0,'Настройка','Нужные координаты: '&@CRLF&'$pos: x.'&$pos[0]&' y.'&$pos[1]&@CRLF&'$pos2: x.'&$pos2[0]&' y.'&$pos2[1]&@CRLF&'$pos2 Color: '&$color2&@CRLF&'$pos3: x.'&$pos3[0]&' y.'&$pos3[1]&@CRLF&'$pos4: x.'&$pos4[0]&' y.'&$pos4[1]&@CRLF&'$pos4 Color: '&$color3)
ToolTip('')
While 1
_checkfish()
Sleep(100)
WEnd
Func _checkfish()
$pixel = PixelSearch($pos2[0],$pos2[1],$pos3[0],$pos3[1],$color,100)
If Not @error Then
For $i = 1 To 9
If $i = 1 Then
MouseClick('',$pixel[0] - 10,$pixel[1] - 10,1,100)
Sleep(100)
$pixel2 = PixelSearch($pos[0] - 10,$pos[1] - 10,$pos[0] + 10,$pos[1] + 10,$color2,100)
If Not @error Then
MouseClick('left',$pixel2[0],$pixel2[1],1,100)
ExitLoop
EndIf
EndIf
If $i = 2 Then
MouseClick('',$pixel[0] + 10,$pixel[1] + 10,1,100)
Sleep(100)
$pixel2 = PixelSearch($pos[0] - 10,$pos[1] - 10,$pos[0] + 10,$pos[1] + 10,$color2,100)
If Not @error Then
MouseClick('left',$pixel2[0],$pixel2[1],1,100)
ExitLoop
EndIf
EndIf
If $i = 3 Then
MouseClick('',$pixel[0] - 10,$pixel[1] + 10,1,100)
Sleep(100)
$pixel2 = PixelSearch($pos[0] - 10,$pos[1] - 10,$pos[0] + 10,$pos[1] + 10,$color2,100)
If Not @error Then
MouseClick('left',$pixel2[0],$pixel2[1],1,100)
ExitLoop
EndIf
EndIf
If $i = 4 Then
MouseClick('',$pixel[0] + 10,$pixel[1] - 10,1,100)
Sleep(100)
$pixel2 = PixelSearch($pos[0] - 10,$pos[1] - 10,$pos[0] + 10,$pos[1] + 10,$color2,100)
If Not @error Then
MouseClick('left',$pixel2[0],$pixel2[1],1,100)
ExitLoop
EndIf
EndIf
If $i = 5 Then
MouseClick('',$pixel[0],$pixel[1] - 10,1,100)
Sleep(100)
$pixel2 = PixelSearch($pos[0] - 10,$pos[1] - 10,$pos[0] + 10,$pos[1] + 10,$color2,100)
If Not @error Then
MouseClick('left',$pixel2[0],$pixel2[1],1,100)
ExitLoop
EndIf
EndIf
If $i = 6 Then
MouseClick('',$pixel[0],$pixel[1] + 10,1,100)
Sleep(100)
$pixel2 = PixelSearch($pos[0] - 10,$pos[1] - 10,$pos[0] + 10,$pos[1] + 10,$color2,100)
If Not @error Then
MouseClick('left',$pixel2[0],$pixel2[1],1,100)
ExitLoop
EndIf
EndIf
If $i = 7 Then
MouseClick('',$pixel[0] - 10,$pixel[1],1,100)
Sleep(100)
$pixel2 = PixelSearch($pos[0] - 10,$pos[1] - 10,$pos[0] + 10,$pos[1] + 10,$color2,100)
If Not @error Then
MouseClick('left',$pixel2[0],$pixel2[1],1,100)
ExitLoop
EndIf
EndIf
If $i = 8 Then
MouseClick('',$pixel[0] + 10,$pixel[1],1,100)
Sleep(100)
$pixel2 = PixelSearch($pos[0] - 10,$pos[1] - 10,$pos[0] + 10,$pos[1] + 10,$color2,100)
If Not @error Then
MouseClick('left',$pixel2[0],$pixel2[1],1,100)
ExitLoop
EndIf
EndIf
If $i = 9 Then
MouseClick('',$pixel[0] - 10,$pixel[1],1,100)
Sleep(100)
$pixel2 = PixelSearch($pos[0] - 10,$pos[1] - 10,$pos[0] + 10,$pos[1] + 10,$color2,100)
If Not @error Then
MouseClick('left',$pixel2[0],$pixel2[1],1,100)
EndIf
EndIf
Next
Do
$pixel3 = PixelSearch($pos4[0] - 20, $pos4[1] - 5, $pos4[0] + 20, $pos4[1] + 5, $color3, 100)
Sleep(100)
Until @error
Sleep(100)
$pixel4 = PixelSearch($pos4[0] - 20, $pos4[1] - 5, $pos4[0] + 20, $pos4[1] + 5, '0xF5E5A9', 100)
If Not @error Then MouseClick("left",$pixel4[0],$pixel4[1])
EndIf
EndFunc
Func _exit()
Exit
EndFunc