Negaal
2008-01-07 13:42:54
Mouse recorder-
-by Nielsie95, Mick and Negaal
I edited it out and got idea from Micks mouse recorder…
-Nielsie helped me to get holding mouse working :)
-I made the base:)
Records mouse clicks and moving very exactly, It's not needed to drag window, I don't recommend it at all…
Made it for text based online game…:)
Have fun
-by Nielsie95, Mick and Negaal
I edited it out and got idea from Micks mouse recorder…
-Nielsie helped me to get holding mouse working :)
-I made the base:)
Records mouse clicks and moving very exactly, It's not needed to drag window, I don't recommend it at all…
Made it for text based online game…:)
program MouseRecorder;
//By Negaal, Nielsie95, Mick
//You can see whats happening from status bar and debug box
//Just hit run
type
mousepos1 = record
x : integer;
y : integer;
isdown : boolean;
timetorelease : Integer;
end;
Const
Randomnessx = 0;
Randomnessy = 0;
Smoothness = 4; //LOWER = SMOOTHER MOVEMENT HIGHER = LESS LAG// //Recommended 1 - 10
RecordLenght = 2200; //HOW MANY COORDS TO RECORD?
PlayBackOnce = True; // plays back only once, if false repeats it
var x, y, i :integer;
var mousecp : Array of mousepos1;
procedure MakecoordsArray;
begin
SetArraylength(mousecp, Recordlenght);
for I:=0 to (RecordLenght)-1 do
begin
Status('Recording');
Wait(Smoothness);
GetMousePos(x, y)
mousecp[i].x := X;
mousecp[i].y := Y;
if ismousebuttondown(true) then
begin
mousecp[i].isdown := true;
for i:=i to (RecordLenght)-1 do
begin
Wait(Smoothness);
GetMousePos(x, y)
mousecp[i].x := X;
mousecp[i].y := Y;
if not ismousebuttondown(true) then
begin
mousecp[i].timetorelease := i;
break;
end;
end;
end;
end;
end;
procedure MoveTheDamnMouse;
begin
Status('Moving mouse...');
for I:=0 to (RecordLenght)-1 do
begin
wait(Smoothness);
MoveMouse(mousecp[i].x+random(Randomnessx), mousecp[i].y+random(Randomnessy));
if mousecp[i].isdown = true then
begin
movemouse(mousecp[i].x,mousecp[i].y);
holdmouse(mousecp[i].x,mousecp[i].y, true)
repeat
MoveMouse(mousecp[i].x+random(Randomnessx), mousecp[i].y+random(Randomnessy));
Wait(Smoothness);
Inc(i);
if mousecp[i].timetorelease = i then Break;
until i >= RecordLenght -1;
i := i -1;
releasemouse(mousecp[i].x,mousecp[i].y, true);
end;
end;
end;
begin
ClearDebug;
Writeln('Press F4 to record');
While not isFKeydown(4) do wait(100);
MakecoordsArray;
Writeln('Recording done!');
Writeln('Press F5 to move your mouse...');
While not isFkeyDown(5) do wait(100);
if playbackonce then MoveTheDamnMouse else
begin
repeat
wait(2000);
MoveTheDamnMouse;
until false
end;
Writeln('Done');
end.
Have fun