I just don't get it guys, I watched those 3 videos and I don't see what the hype is all about. I made a simple addition to WindMouse that, first, moves the mouse into a "miss region" before hitting the target destination and then corrects itself. I talked about it
here but it didn't get much attention.
On top of that just yesterday infact I modified WindMouse to shift mouse speeds for each 'step' the mouse takes to move to the next point on the path. I already included this in the newest Barb Fly-Fisher (1.5+) and I plan to use it throughout my scripts from now on. Right now I just use a static (but randomly generated) mouse speed to add/subtract from the current mouse speed during each mouse step in a path. This can easily be redone to add/subtract speed based off the original mouse speed (by a percentage, I'd imagine). Here's what I have so far:
//By Bandland100, modified to shift mouse speeds after every step
procedure SuperWindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended);
var
veloX,veloY,windX,windY,veloMag,dist,randomDist,lastDist,step: extended;
lastX,lastY,MSP: integer;
sqrt2,sqrt3,sqrt5: extended;
begin
MSP := MouseSpeed;
sqrt2:= sqrt(2);
sqrt3:= sqrt(3);
sqrt5:= sqrt(5);
while hypot(xs - xe, ys - ye) > 1 do
begin
dist:= hypot(xs - xe, ys - ye);
wind:= minE(wind, dist);
if dist >= targetArea then
begin
windX:= windX / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
windY:= windY / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
end else
begin
windX:= windX / sqrt2;
windY:= windY / sqrt2;
if (maxStep < 3) then
begin
maxStep:= random(3) + 3.0;
end else
begin
maxStep:= maxStep / sqrt5;
end;
end;
veloX:= veloX + windX;
veloY:= veloY + windY;
veloX:= veloX + gravity * (xe - xs) / dist;
veloY:= veloY + gravity * (ye - ys) / dist;
if hypot(veloX, veloY) > maxStep then
begin
randomDist:= maxStep / 2.0 + random(round(maxStep) div 2);
veloMag:= sqrt(veloX * veloX + veloY * veloY);
veloX:= (veloX / veloMag) * randomDist;
veloY:= (veloY / veloMag) * randomDist;
end;
lastX:= Round(xs);
lastY:= Round(ys);
xs:= xs + veloX;
ys:= ys + veloY;
{For now statically add or subtract 2..5 speed}
case Random(2) of
1: MouseSpeed := (MSP + (RandomRange(2, 5)));
2: MouseSpeed := (MSP - (RandomRange(2, 5)));
end;
if (MouseSpeed < 4) then
MouseSpeed := 4;
if (lastX <> Round(xs)) or (lastY <> Round(ys)) then
MoveMouse(Round(xs), Round(ys));
step:= hypot(xs - lastX, ys - lastY);
wait(round((maxWait - minWait) * (step / maxStep) + minWait));
lastdist:= dist;
MouseSpeed := MS;
end;
{For now statically add or subtract 2..5 speed}
case Random(2) of
1: MouseSpeed := (MSP + (RandomRange(2, 5)));
2: MouseSpeed := (MSP - (RandomRange(2, 5)));
end;
if (MouseSpeed < 4) then
MouseSpeed := 4;
if (Round(xe) <> Round(xs)) or (Round(ye) <> Round(ys)) then
MoveMouse(Round(xe), Round(ye));
MouseSpeed := MSP;
end;
Come on guys, the hard part Ben has already done for us, but why stop there? With even just a little bit of modification we can make our mouse movements identical to any real person.
Forever we've been using a single speed when moving from one point to another, why is that?