SRL Archive - Research & Development Lounge

MessUpMouse.


Buckleyindahouse

2007-07-05 14:21:38

Whenever Im alching or doing a task, I noticed sometimes if my elbow sleeps then my mouse moves very fast away from my destination then I move it back to click or if someone bumps you while your moving the mouse or bout to click.I've made a function that mimics that movement. Ignore Standards -.-


program New;
{.Include srl/srl.scar}


{*******************************************************************************
Procedure MessUpMouse(x,y,rx,ry:Integer;Click:Boolean;ClickString:String);
By: BuckleyInDaHouse
Description: Tries to move the mouse to destination messing
up in the process as you was bumped or slipped then moves
the mouse back and clicks in the correct place.
X,Y : Coords.
Rx,Ry:Random X,Y.
Click : True to click False To Right Click.
ClickString:Only matters if click is false and this is for ChooseOption.
*******************************************************************************}

Procedure MessUpMouse(x,y,rx,ry:Integer;Click:Boolean;ClickString:String);
Var xx,yy:Integer;
Begin
If(Click)Then
Begin
MMouse(x,y,rx,ry);
MouseSpeed := 1;
Case Random(2) Of
0 : MMouse(x+(70)-Random(5),y+(-70)-Random(5),5,5);
1 : MMouse(x+(70)-Random(5),y+(-70)-Random(5),5,5);
End;
GetMousePos(xx,yy);
WriteLn('Moved Mouse to X:'+IntToStr(xx)+',Y:'+IntToStr(yy));
MouseSpeed := 15+Random(10);
Mouse(x,y,0,0,True);
End;
If(Not(Click))Then
Begin
MMouse(x,y,rx,ry);
MouseSpeed := 1;
Case Random(2) Of
0 : MMouse(x+(70)-Random(5),y+(-70)-Random(5),5,5);
1 : MMouse(x+(70)-Random(5),y+(-70)-Random(5),5,5);
End;
GetMousePos(xx,yy);
WriteLn('Moved Mouse to X:'+IntToStr(xx)+',Y:'+IntToStr(yy));
MouseSpeed := 15+Random(10);
Mouse(x,y,0,0,False);
ChooseOption(x,y,ClickString);
End;
End;

Begin
MessUpMouse(638,192,3,3,True,'none');
End.

HopeFully it works out good.

nielsie95

2007-07-05 14:47:34

Looks nice :)

Maybe you should get the mousespeed at the beginning and set it back at the end.

MessUpMouse > MUM :p

Buckleyindahouse

2007-07-05 15:01:38

From: nielsie95
Looks nice :)

Maybe you should get the mousespeed at the beginning and set it back at the end.

MessUpMouse > MUM :p



I will take you advice and see what i can do about the mouse speed. I like the code name loo MUM.

Bobarkinator

2007-07-07 18:17:22

Looks very nice. I do this a lot lol.

Buckleyindahouse

2007-07-07 18:28:12

Thanx.

Santa_Clause

2007-07-07 18:56:37

program New;
{.Include srl/srl.scar}

{*******************************************************************************
Procedure MessUpMouse(x,y,rx,ry:Integer;Click:Boolean;ClickString:String);
By: BuckleyInDaHouse
Description: Tries to move the mouse to destination messing
up in the process as you was bumped or slipped then moves
the mouse back and clicks in the correct place.
X,Y : Coords.
Rx,Ry:Random X,Y.
Click : True to click False To Right Click.
ClickString:Only matters if click is false and this is for ChooseOption.
*******************************************************************************}

procedure MessUpMouse(x, y, rx, ry : Integer; Click : Boolean; ClickString : string);
var xx, yy : Integer;
begin
if (Click) then
begin
MMouse(x, y, rx, ry);
MouseSpeed := 1;
case Random(2) of
0 : MMouse(x + (70) - Random(5), y + (-70) - Random(5), 5, 5);
1 : MMouse(x + (70) - Random(5), y + (-70) - Random(5), 5, 5);
end;
GetMousePos(xx, yy);
WriteLn('Moved Mouse to X:' + IntToStr(xx) + ',Y:' + IntToStr(yy));
MouseSpeed := 15 + Random(10);
Mouse(x, y, 0, 0, True);
end;
if (not (Click)) then
begin
MMouse(x, y, rx, ry);
MouseSpeed := 1;
case Random(2) of
0 : MMouse(x + (70) - Random(5), y + (-70) - Random(5), 5, 5);
1 : MMouse(x + (70) - Random(5), y + (-70) - Random(5), 5, 5);
end;
GetMousePos(xx, yy);
WriteLn('Moved Mouse to X:' + IntToStr(xx) + ',Y:' + IntToStr(yy));
MouseSpeed := 15 + Random(10);
Mouse(x, y, 0, 0, False);
ChooseOption(x, y, ClickString);
end;
end;

begin
MessUpMouse(638, 192, 3, 3, True, 'none');
end.

Before JAD gets here ;)

Buckleyindahouse

2007-07-07 19:29:27

Eh, thats why i said ignore the standards. I don't care bout standards really all that much.

Santa_Clause

2007-07-07 19:44:40

Grr! You have no idea how long it took to put that through a formatter! Anyways, I thought 'Eh' was what I always said?

Buckleyindahouse

2007-07-07 20:29:10

From: SantaClause
Grr! You have no idea how long it took to put that through a formatter! Anyways, I thought 'Eh' was what I always said?


It was, until you gave me the "eh" disease. -.- i hate you.

joshie

2007-07-08 01:59:30

OFFTOPIC.

LMFAO at that black guy in your sig.

Buckleyindahouse

2007-07-08 02:06:37

From: joshie
OFFTOPIC.

LMFAO at that black guy in your sig.


:D.

Timothegreat

2007-07-09 13:12:08

nice idea Buckley

keep'em comin.

Buckleyindahouse

2007-07-09 13:28:24

From: Timothegreat
nice idea Buckley

keep'em comin.


I sure will once I think of some more :D.