jimmy_mac
2010-01-07 08:28:45
Hey let me know what you think of this. its just adding some randomness to the Mouse function. Makes it so that the mouse moves past the spot you define then back to it. If it's useful add it, else hit us up with some CC.
E: If you wanna test, run the script below. change the values in Mouse2(); down the bottom.
E: Ok so how does this look? also what do you think about it in general? worth using or not?
E: If you wanna test, run the script below. change the values in Mouse2(); down the bottom.
E: Ok so how does this look? also what do you think about it in general? worth using or not?
program Mouse;
{.include srl/srl.scar}
procedure Mouse2(mousex, mousey, ranx, rany: Integer; left: Boolean);
var
a, b, c, x1, x2, y1, y2: Integer;
begin
GetMousePos(x1, y1);
x2 := mousex + ((mousex - x1) div RandomRange(10, 20));
y2 := mousey + ((mousey - y1) div RandomRange(10, 20));
ranx := random(ranx);
rany := random(rany);
MMouse(x2+ranx, y2+rany, 0, 0);
if (not InRange(x2, mousex, mousex+ranx)) and (not InRange(y2, mousey, mousey+rany)) then
begin
wait(20+random(15));
MMouse(mousex+ranx, mousey+rany, 0, 0);
end;
wait(60+random(30));
GetMousePos(b, c);
HoldMouse(b, c, left);
repeat
Wait(20 + Random(30));
a := a + 1;
until (a > 4);
GetMousePos(b, c);
ReleaseMouse(b, c, left);
Wait(100 + Random(100));
end;
begin
SetupSRL;
Mouse2(111, 709, 5, 5, True);
end.