Hello. I wanted to see what you guys mean about this wierd mouse-moving function? It very simple, so, pretty much the first thing i've ported to Pascal in many many years!
It purely condition based, no real math involved, it moves. The speed will differ according to it's angle (and distance).
Speed might need some adjustment (Wait time at the end), and it could be made more randomized, and "smarter"..
procedure SimpleMouse(x,y:Integer);
var wx,wy,px,py,ax,ay:Integer;
begin
GetMousePos(wx, wy);
repeat
if(y>wy) and (x>wx) Then begin px:=x-wx; py:=y-wy; end;
if(y<wy) and (x>wx) Then begin px:=x-wx; py:=wy-y; end;
if(y<wy) and (x<wx) Then begin px:=wx-x; py:=wy-y; end;
if(y>wy) and (x<wx) Then begin px:=wx-x; py:=y-wy; end;
if(y>wy) and (x=wx) Then begin px:=x; py:=y-wy; end;
if(y<wy) and (x=wx) Then begin px:=x; py:=wy-y; end;
if(x<wx) and (y=wy) Then begin px:=x-wx; py:=y; end;
if(x>wx) and (y=wy) Then begin px:=wx-x; py:=y; end;
if(px>py) and (px<>0) and (py<>0) Then begin ax:=round(px div py); ay:=1; end;
if(px<py) and (px<>0) and (py<>0) Then begin ay:=round(py div px); ax:=1; end;
if(px=py) or (px=0) or (py=0) Then begin ax:=1; ay:=1; end;
if(wx<x) Then wx:=wx+ax;
if(wy<y) Then wy:=wy+ay;
if(wx>x) Then wx:=wx-ax;
if(wy>y) Then wy:=wy-ay;
MoveMouse(wx,wy)
wait(3+Random(3))
until(wx=x) and (wy=y);
end;
Meh.. ;-P