HotKeySet("{ESC}", "_Exit")
HotKeySet("{F3}", "Find")
Func _Exit()
Exit 0
EndFunc
func Find()
$x = 0
$y = 0
$xx = 0
$zz = 0
while 1
$pos=PixelSearch($x,$y,@DesktopWidth,@DesktopHeight,0xED1C24,2,2) ;центр
if not @error then
if $pos[0] <> $xx then
PixelSearch($pos[0],$pos[1]+1,$pos[0],$pos[1],0xB5E61D,1);вниз от центра
if not @error then
PixelSearch($pos[0],$pos[1]-1,$pos[0],$pos[1],0xFFC90E,1);вверх от центра
if not @error then
PixelSearch($pos[0]+1,$pos[1],$pos[0],$pos[1],0x00A2E8,1);в право от центра
if not @error then
PixelSearch($pos[0]-1,$pos[1],$pos[0],$pos[1],0xFFF200,1);влево от центра
if not @error then
ConsoleWrite(@CR&$s[0]&" ; "&$s[1])
MouseMove($pos[0],$pos[1],5)
sleep(200)
MouseDown("left")
Sleep(200)
MouseUp("left")
endif
endif
endif
endif
endif
endif
$y+=1
if $y > @DesktopHeight Then
if $x > @DesktopWidth Then ExitLoop
$y = 0
$x+=@DesktopWidth
endif
if not @error then
$xx = $pos[0]
endif
wend
endfunc
while 1
sleep(100)
WEnd