imbader22@gmail.com Posted November 13, 2020 Share Posted November 13, 2020 Quote var x, y:integer; procedure Pot; begin w := FindWindows('Endless Online'); ActivateClient repeat if(FindColorSpiral(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(x, y, 1579032, 185, 38, 185, 38)=false) end; begin repeat Pot until(false) end. I have tried this 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(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 untilFindColorSpiral(x, y, 1579032, 185, 38, 185, 38)= false end; begin repeat Pot until(false) end. But I get compile error in line 13 variable expected I have a working script works fine. but this one i cant get it to work Quote Link to comment Share on other sites More sharing options...
Wanted Posted November 21, 2020 Share Posted November 21, 2020 On 11/13/2020 at 4:36 AM, imbader22@gmail.com said: I have tried this 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(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 untilFindColorSpiral(x, y, 1579032, 185, 38, 185, 38)= false end; begin repeat Pot until(false) end. But I get compile error in line 13 variable expected I have a working script works fine. but this one i cant get it to work 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. Quote Link to comment Share on other sites More sharing options...