SCAR Code:
function MMouse(dx, dy, RandX, RandY: Integer): Boolean;
var
Path: TPointArray;
i, cx, cy, Lx, Ly, xx, yy, Dist, MidRX, MidRY: Integer;
Step, SlowDown: Extended;
begin
Result := True;
if (BenMouse) then
begin
try
MidRX := Round(RandX / 2);
MidRY := Round(RandY / 2);
dx := dx + MidRX + NormDist(MidRX);
dy := dy + MidRY + NormDist(MidRY);
if dx < 0 then dx := 0;
if dy < 0 then dy := 0;
GetMousePos(cx, cy)
if not ((Cx - dx = 0) and (Cy - dy = 0)) then
begin
Path := MakeMouseSplinePath(cx, cy, dx, dy, 7, 50, 40);
Lx := cx;
Ly := cy;
for i := 0 to GetArrayLength(Path) - 1 do
begin
MoveMouse(Path[i].x, Path[i].y);
Dist := Round(Sqrt((Path[i].x - dx) * (Path[i].x - dx) + (Path[i].y -
dy) * (Path[i].y - dy)));
if Dist < 50 then
begin
SlowDown := SlowDown + (0.05 * MouseSpeed);
end;
Wait(Round(((Random(2) + MouseSpeed) / 10) * Sqrt(Sqr(Path[i].x - Lx)
+ Sqr(Path[i].y - Ly)) + SlowDown));
Lx := Path[i].x;
Ly := Path[i].y;
end;
end;
MoveMouseSmooth(dx, dy);
except
WriteLn('Error in BenMouse');
WriteLn('Report: ' + IntToStr(cx) + ', ' + IntToStr(cy) + ' : ' +
IntToStr(dx) + ', ' + IntToStr(dy) + ' : ' + IntToStr(mousespeed) +
';');
end;
end else
begin // Start Mutant/RsN MMouse
step := 4;
xx := NormDist(RandX);
yy := NormDist(RandY);
dx := dx + xx;
dy := dy + yy;
GetMousePos(x, y);
repeat
if (Distance(x, y, dx, dy) < 100) then
if (not (Distance(x, y, dx, dy) = 0)) then
step := step - (10 / Distance(x, y, dx, dy));
if (step < 1) then
step := 1;
x := x + Round((dx - x) / step);
y := y + Round((dy - y) / step);
MoveMouse(x, y);
Wait(MouseSpeed);
until (Distance(x, y, dx, dy) = 0);
end;
end;
Short answer: yes
Long answer: no, but what it does is essentially the same thing
Explanation: It will make a box around the point you want to click. The box's size is dependent upon the randomness you set. The function will then move the mouse to a random point inside the box.
[I used MMouse as an example because it's simpler than, but does the same thing as Mouse (as far as mouse movement is concerned)]