Jump to content
opiumhautopium1

IsKeyDown

Recommended Posts

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 by opiumhautopium1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...