RANDOM GAME

#5
procedure TForm1.click(x,y,pause:integer);
var rect : TRect;
p1, p2 : TPoint;
PT:TPoint;
begin
Application.ProcessMessages;
Pt.x:=x;
Pt.y:=y;
Pt.x := Round(Pt.x * (65535 / Screen.Width));
Pt.y := Round(Pt.y * (65535 / Screen.Height));
Mouse_Event(MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_MOVE,Pt.x,Pt.y,0,0);
Mouse_Event(MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_LEFTDOWN,Pt.x,Pt.y,0,0);
Mouse_Event(MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_LEFTUP,Pt.x,Pt.y,0,0);
Mouse_Event(MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_LEFTDOWN,Pt.x,Pt.y,0,0);
Mouse_Event(MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_LEFTUP,Pt.x,Pt.y,0,0);
end;
procedure TForm1.Button3Click(Sender: TObject);
var
i:integer;
i2:integer;
a: array of array of Integer;
xx1,yy1:integer;
begin
SetLength(a, 5,2);
a[0,1]:=361;
a[0,2]:=561;
a[1,1]:=413;
a[1,2]:=558;
a[2,1]:=465;
a[2,2]:=560;
a[3,1]:=410;
a[3,2]:=512;
for i:=0 to 10000 do begin
randomize;
sleep(1000);
click(630,287,0);
sleep(4000);
for i2:=0 to 230 do begin
sleep(250);
count:=random(4);
xx1:=a[count,1];
yy1:=a[count,2];
click(xx1,yy1,0);
end;
sleep(10000);
click(649,457,0);
sleep(2000);
end;
end;
 
Сверху