Hello, I have problem with script. My script click on point 1, wait 5 sec and click on point 2 etc. I want to search for point 1, when point 1 is visible click on them wait for reach and search for point 2, click on them, wait for reach etc. Is there any option to check if point is reached then go next?
#include <Array.au3>
HotKeySet("{HOME}", "START")
HotKeySet("{END}", "_EXIT")
While 1
Sleep(250)
WEnd
Func Start()
$Point1 = 0x44CE57
$Point2 = 0x0F0FFF
$Point3 = 0xF50000
While 1
$mark1 = PixelSearch(1199, 135, 1304, 27, $Point1)
$reach1 = PixelSearch(1248, 80, 1254, 86, $Point1)
If IsArray($mark1) = 1 And IsArray($reach1) = 0 Then
MouseMove($mark1[0], $mark1[1], 0)
MouseClick("primary")
Sleep(5000)
EndIf
$mark2 = PixelSearch(1199, 135, 1304, 27, $Point2)
$reach2 = PixelSearch(1248, 80, 1254, 86, $Point2)
If IsArray($mark2) = 1 And IsArray($reach2) = 0 Then
MouseMove($mark2[0], $mark2[1], 0)
MouseClick("primary")
Sleep(5000)
EndIf
$mark3 = PixelSearch(1199, 135, 1304, 27, $Point3)
$reach3 = PixelSearch(1248, 80, 1254, 86, $Point3)
If IsArray($mark3) = 1 And IsArray($reach3) = 0 Then
MouseMove($mark3[0], $mark3[1], 0)
MouseClick("primary")
Sleep(5000)
EndIf
WEnd
EndFunc
Func _EXIT()
Exit
EndFunc