opiumhautopium1 Posted December 26, 2011 Share Posted December 26, 2011 (edited) hello i want to save coordinates by push button 4 to 8 and i want to save the cordinates push button 4 in put it in x4 ,y4 then ask for 5 push button 5 put it in x5, y5 and scar shout loop until 4 is pressed and saved then loop 5 until it is pressed and saved 6..7...8... but my problem is while (IsKeyDown(i)=false) do and i dont know how to do ?!? var x : Array [4..8] of Integer; y : Array [4..8] of Integer; i: Integer; begin for i := 4 to 8 do while (IsKeyDown(i)=false) do begin Writeln('press '+inttostr(i)+' to save'); end; if (IsKeyDown(i)=true) then begin GetMousePos(a, b); ClickMouse(a, b, true); writeln('cordi 1 ='+inttostr(a)+' / '+inttostr(b)); wait(2000); at my first script it work fine with this but i want to try another way to learn different ways while (IsKeyDown('1')=false) do begin Writeln('press 1 to save'); end; if (IsKeyDown('1')=true) then begin GetMousePos(a, b); ClickMouse(a, b, true); writeln('cordi 1 ='+inttostr(a)+' / '+inttostr(b)); result:=true; wait(2000); end; thx in advance the eggdocktor sorry for bad english ^^? Edited December 27, 2011 by opiumhautopium1 Quote Link to comment Share on other sites More sharing options...