var x, y:integer;
w: THwndArray;
procedure Pot;
begin
w := FindWindows('Endless Online');
if (High(w) > -1) then
begin
ActivateWindow(w[0]);
SetLength(w, 0);
Wait(500);
end;
repeat
if FindColorSpiral(0, 0, x, y, 1579032, 185, 38, 185, 38) then
begin
clickmouse(78, 360, true);
wait(50)
clickmouse(464, 376, true);
wait(15)
clickmouse(464, 376, true);
wait(500)
end;
until FindColorSpiral(0, 0, x, y, 1579032, 185, 38, 185, 38)= false
end;
begin
repeat
Pot
until(false)
end.
You need to include the start points in FindColorSpiral (SE, SY) I put in 0, 0 for you and added some semicolons where needed to get the compilation errors to go away.