Abyssal
2007-05-29 21:37:02
Made this because I was bored, have fun!
program MouseRecorder;
var
TP: array of TPoint;
procedure PlayRecorded;
var
i: Integer;
begin
for i:= 0 to GetArrayLength(TP) - 1 do
begin
MoveMouse(TP[i].X, TP[i].Y);
Wait(10);
end;
end;
procedure RecordMouse;
var
x, y, xC, yC, i: Integer;
begin
repeat
GetMousePos(x, y);
TP[i].X:= x;
TP[i].Y:= y;
Wait(10);
GetMousePos(xC, yC);
if(xC <> x)or(yC <> y)then
begin
Inc(i);
SetArrayLength(TP, Length(TP) + 1);
TP[i].X:= xC;
TP[i].Y:= yC;
end;
until(IsFunctionKeyDown(1));
end;
begin
SetArrayLength(TP, 1);
RecordMouse;
Writeln('PLAYING IN 1 SECOND');
Wait(1000);
PlayRecorded;
end.