Edited it a bit, now you don't have to copy paste from debug box...
SCAR Code:
program MouseRecorder;
{.include SRL/SRL.scar}
Const
Randomnessx = 2;
Randomnessy = 2;
Smoothness = 200; //LOWER = SMOOTHER MOVEMENT HIGHER = LESS LAG
RecordLenght = 50; //HOW MANY COORDS TO RECORD?
var x, y, Recorded, i :integer;
var Position : TpointArray;
procedure MakecoordsArray;
begin
SetArraylength(Position, Recordlenght);
for I:=0 to (RecordLenght)-1 do
begin
Status('Recording');
Wait(Smoothness);
GetMousePos(x,y)
Position[i].x := X;
Position[i].y := Y;
end;
end;
procedure MoveTheDamnMouse;
begin
Status('Moving mouse...');
for I:=0 to (RecordLenght)-1 do
Mmouse(Position[i].x,Position[i].y,Randomnessx, Randomnessy);
end;
begin
ClearDebug;
SetupSRL;
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);
MoveTheDamnMouse;
Writeln('Done');
end.
Edit:
This one doesn't do wierd movements
SCAR Code:
program MouseRecorder;
{.include SRL/SRL.scar}
Const
Randomnessx = 2;
Randomnessy = 2;
Smoothness = 3; //LOWER = SMOOTHER MOVEMENT HIGHER = LESS LAG//
//If you use SRLMouse then it should be over 100 else it should be 2-15
RecordLenght = 1000; //HOW MANY COORDS TO RECORD?
UseSRLMouse = False;
var x, y, Recorded, i :integer;
var Position : TpointArray;
procedure MakecoordsArray;
begin
SetArraylength(Position, Recordlenght);
for I:=0 to (RecordLenght)-1 do
begin
Status('Recording');
Wait(Smoothness);
GetMousePos(x,y)
Position[i].x := X;
Position[i].y := Y;
end;
end;
procedure MoveTheDamnMouse;
begin
Status('Moving mouse...');
for I:=0 to (RecordLenght)-1 do
if UseSRLMouse then Mmouse(Position[i].x,Position[i].y,Randomnessx, Randomnessy) else
begin
wait(Smoothness);
MoveMouse(Position[i].x+random(Randomnessx),Position[i].y+random(Randomnessy));
end;
end;
begin
ClearDebug;
SetupSRL;
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);
MoveTheDamnMouse;
Writeln('Done');
end.