PDA

View Full Version : MessUpMouse.



Buckleyindahouse
07-05-2007, 06:21 PM
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;ClickS tring: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;ClickS tring: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
07-05-2007, 06:47 PM
Looks nice :)

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

MessUpMouse > MUM :p

Buckleyindahouse
07-05-2007, 07:01 PM
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
07-07-2007, 10:17 PM
Looks very nice. I do this a lot lol.

Buckleyindahouse
07-07-2007, 10:28 PM
Thanx.

Santa_Clause
07-07-2007, 10:56 PM
program New;
{.Include srl/srl.scar}

{************************************************* ******************************
Procedure MessUpMouse(x,y,rx,ry:Integer;Click:Boolean;ClickS tring: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
07-07-2007, 11:29 PM
Eh, thats why i said ignore the standards. I don't care bout standards really all that much.

Santa_Clause
07-07-2007, 11:44 PM
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
07-08-2007, 12:29 AM
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
07-08-2007, 05:59 AM
OFFTOPIC.

LMFAO at that black guy in your sig.

Buckleyindahouse
07-08-2007, 06:06 AM
OFFTOPIC.

LMFAO at that black guy in your sig.

:D.

Timothegreat
07-09-2007, 05:12 PM
nice idea Buckley

keep'em comin.

Buckleyindahouse
07-09-2007, 05:28 PM
nice idea Buckley

keep'em comin.

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