Jump to content
ahmedb

how to hold the mouse and then move it and then release it

Recommended Posts

DragMouse in OSI mouse functions

 

[sCAR]{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Official SCAR Include

Mouse Routines

--------------------------------------------------------------------------------

* procedure MMouse(x, y, rx, ry: Integer);

By: Timer

* procedure HoldMouseWait(x, y, rx, ry, MinTime, MaxTime: Integer; Left: Boolean);

By: Wanted

* procedure Mouse(x, y, rx, ry: Integer; Left: Boolean);

By: Anonymous

* procedure HoldMouseWaitBox(x1, y1, x2, y2, MinTime, MaxTime: Integer; Left: Boolean);

By: Wanted

* procedure MouseBox(x1, y1, x2, y2: Integer; TypeC: ClickActions);

By: Anonymous

* procedure MouseCircle(Radius, CX, CY: Integer; TypeC: ClickActions);

By: Zyt3x & Wanted.

* procedure DragMouse(sX, sY, sRX, sRY, eX, eY, eRX, eRY: Integer; Left: Boolean);

By: Naum

* procedure DragMouseBox(sX1, sY1, sX2, sY2, eX1, eY1, eX2, eY2: Integer; Left: Boolean);

By: Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure MMouse(x, y, rx, ry: Integer);

Contributors: Timer, Wanted.

Description: Moves the mouse humanly.

Date Created: August 7th, 2011. By Timer

Last Modification: September 18th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure MMouse(x, y, rx, ry: Integer);

var

P: TPoint;

begin

P := RRectanglePoint(X - RX, Y - RY, X + RX, Y + RY);

if (not (MouseSpeed = 0)) then

MoveWindMouseEx(P.X, P.Y, 0, 0, MouseSpeed)

else

MoveWindMouse(P.X, P.Y, 0, 0);

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure HoldMouseWait(x, y, rx, ry, MinTime, MaxTime: Integer; Left: Boolean);

Contributors: Wanted, Timer, Anonymous.

Description: Moves the mouse and clicks + holds humanly.

Date Created: August 19th, 2011. By Wanted

Last Modification: August 19th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure HoldMouseWait(x, y, rx, ry, MinTime, MaxTime: Integer; Left: Boolean);

var

cx, cy: Integer;

begin

MMouse(x, y, rx, ry);

WaitRR(60, 90);

GetMousePos(cx, cy);

HoldMouse(cx, cy, Left);

WaitRR(MinTime, MaxTime);

GetMousePos(cx, cy);

ReleaseMouse(cx, cy, Left);

WaitRR(100, 200);

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure Mouse(x, y, rx, ry: Integer; Left: Boolean);

Contributors: Anonymous, Timer, Wanted.

Description: Moves the mouse and clicks humanly.

Date Created: August 7th, 2011. By Anonymous

Last Modification: August 19th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure Mouse(x, y, rx, ry: Integer; Left: Boolean);

begin

HoldMouseWait(x, y, rx, ry, 80, 120, Left);

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure HoldMouseWaitBox(x1, y1, x2, y2, MinTime, MaxTime: Integer; Left: Boolean);

Contributors: Wanted

Description: Moves the mouse and clicks + holds humanly.

Date Created: August 19th, 2011. By Wanted

Last Modification: September 18th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure HoldMouseWaitBox(x1, y1, x2, y2, MinTime, MaxTime: Integer; Left: Boolean);

var

P: TPoint;

begin

P := RRectanglePoint(X1, Y1, X2, Y2);

HoldMouseWait(P.X, P.Y, 0, 0, MinTime, MaxTime, Left);

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure MouseBox(x1, y1, x2, y2: Integer; TypeC: ClickActions);

Contributors: Anonymous, Timer, Wanted.

Description: Clicks/moves the mouse in a specified area.

Date Created: August 7th, 2011. By Anonymous

Last Modification: September 18th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure MouseBox(x1, y1, x2, y2: Integer; TypeC: ClickActions);

var

P: TPoint;

begin

P := RRectanglePoint(X1, Y1, X2, Y2);

case (TypeC) of

ClickLeft: Mouse(P.X, P.Y, 0, 0, True);

ClickRight: Mouse(P.X, P.Y, 0, 0, False);

MoveTo: MMouse(P.X, P.Y, 0, 0);

end;

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure MouseCircle(Radius, CX, CY: Integer; TypeC: ClickActions);

Contributors: Zyt3x, Wanted.

Description: Clicks/moves the mouse in a circle with a specified radius.

Date Created: September 4th, 2011. By Zyt3x & Wanted.

Last Modification: September 18th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure MouseCircle(Radius, CX, CY: Integer; TypeC: ClickActions);

var

P: TPoint;

begin

P := RCirclePoint(Radius, CX, CY);

case TypeC of

ClickLeft: Mouse(P.X, P.Y, 0, 0, True);

ClickRight: Mouse(P.X, P.Y, 0, 0, False);

MoveTo: MMouse(P.X, P.Y, 0, 0);

end;

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure DragMouse(sX, sY, sRX, sRY, eX, eY, eRX, eRY: Integer; Left: Boolean);

Contributors: Naum, Wanted.

Description: Clicks and holds the mouse and then drags it and releases it.

Date Created: August 7th, 2011. By Naum

Last Modification: August 19th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure DragMouse(sX, sY, sRX, sRY, eX, eY, eRX, eRY: Integer; Left: Boolean);

var

cx, cy: Integer;

begin

MMouse(sX, sY, sRX, sRY);

WaitRR(60, 90);

GetMousePos(cx, cy);

HoldMouse(cx, cy, Left);

WaitRR(80, 120);

MMouse(eX, eY, eRX, eRY);

WaitRR(60, 90);

GetMousePos(cx, cy);

ReleaseMouse(cx, cy, Left);

WaitRR(100, 200);

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure DragMouseBox(sX1, sY1, sX2, sY2, eX1, eY1, eX2, eY2: Integer; Left: Boolean);

Contributors: Wanted

Description: See DragMouse. Except for does in box areas.

Date Created: August 19th, 2011. By Wanted

Last Modification: August 19th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure DragMouseBox(sX1, sY1, sX2, sY2, eX1, eY1, eX2, eY2: Integer; Left: Boolean);

var

cx, cy: Integer;

begin

MouseBox(sX1, sY1, sX2, sY2, MoveTo);

WaitRR(60, 90);

GetMousePos(cx, cy);

HoldMouse(cx, cy, Left);

WaitRR(80, 120);

MouseBox(eX1, eY1, eX2, eY2, MoveTo);

WaitRR(60, 90);

GetMousePos(cx, cy);

ReleaseMouse(cx, cy, Left);

WaitRR(100, 200);

end;[/sCAR]

 

I hope this helps.

 

Once OSI beta is out you can utilize these with OSI.

Link to comment
Share on other sites

DragMouse in OSI mouse functions

 

[sCAR]{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Official SCAR Include

Mouse Routines

--------------------------------------------------------------------------------

* procedure MMouse(x, y, rx, ry: Integer);

By: Timer

* procedure HoldMouseWait(x, y, rx, ry, MinTime, MaxTime: Integer; Left: Boolean);

By: Wanted

* procedure Mouse(x, y, rx, ry: Integer; Left: Boolean);

By: Anonymous

* procedure HoldMouseWaitBox(x1, y1, x2, y2, MinTime, MaxTime: Integer; Left: Boolean);

By: Wanted

* procedure MouseBox(x1, y1, x2, y2: Integer; TypeC: ClickActions);

By: Anonymous

* procedure MouseCircle(Radius, CX, CY: Integer; TypeC: ClickActions);

By: Zyt3x & Wanted.

* procedure DragMouse(sX, sY, sRX, sRY, eX, eY, eRX, eRY: Integer; Left: Boolean);

By: Naum

* procedure DragMouseBox(sX1, sY1, sX2, sY2, eX1, eY1, eX2, eY2: Integer; Left: Boolean);

By: Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure MMouse(x, y, rx, ry: Integer);

Contributors: Timer, Wanted.

Description: Moves the mouse humanly.

Date Created: August 7th, 2011. By Timer

Last Modification: September 18th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure MMouse(x, y, rx, ry: Integer);

var

P: TPoint;

begin

P := RRectanglePoint(X - RX, Y - RY, X + RX, Y + RY);

if (not (MouseSpeed = 0)) then

MoveWindMouseEx(P.X, P.Y, 0, 0, MouseSpeed)

else

MoveWindMouse(P.X, P.Y, 0, 0);

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure HoldMouseWait(x, y, rx, ry, MinTime, MaxTime: Integer; Left: Boolean);

Contributors: Wanted, Timer, Anonymous.

Description: Moves the mouse and clicks + holds humanly.

Date Created: August 19th, 2011. By Wanted

Last Modification: August 19th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure HoldMouseWait(x, y, rx, ry, MinTime, MaxTime: Integer; Left: Boolean);

var

cx, cy: Integer;

begin

MMouse(x, y, rx, ry);

WaitRR(60, 90);

GetMousePos(cx, cy);

HoldMouse(cx, cy, Left);

WaitRR(MinTime, MaxTime);

GetMousePos(cx, cy);

ReleaseMouse(cx, cy, Left);

WaitRR(100, 200);

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure Mouse(x, y, rx, ry: Integer; Left: Boolean);

Contributors: Anonymous, Timer, Wanted.

Description: Moves the mouse and clicks humanly.

Date Created: August 7th, 2011. By Anonymous

Last Modification: August 19th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure Mouse(x, y, rx, ry: Integer; Left: Boolean);

begin

HoldMouseWait(x, y, rx, ry, 80, 120, Left);

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure HoldMouseWaitBox(x1, y1, x2, y2, MinTime, MaxTime: Integer; Left: Boolean);

Contributors: Wanted

Description: Moves the mouse and clicks + holds humanly.

Date Created: August 19th, 2011. By Wanted

Last Modification: September 18th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure HoldMouseWaitBox(x1, y1, x2, y2, MinTime, MaxTime: Integer; Left: Boolean);

var

P: TPoint;

begin

P := RRectanglePoint(X1, Y1, X2, Y2);

HoldMouseWait(P.X, P.Y, 0, 0, MinTime, MaxTime, Left);

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure MouseBox(x1, y1, x2, y2: Integer; TypeC: ClickActions);

Contributors: Anonymous, Timer, Wanted.

Description: Clicks/moves the mouse in a specified area.

Date Created: August 7th, 2011. By Anonymous

Last Modification: September 18th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure MouseBox(x1, y1, x2, y2: Integer; TypeC: ClickActions);

var

P: TPoint;

begin

P := RRectanglePoint(X1, Y1, X2, Y2);

case (TypeC) of

ClickLeft: Mouse(P.X, P.Y, 0, 0, True);

ClickRight: Mouse(P.X, P.Y, 0, 0, False);

MoveTo: MMouse(P.X, P.Y, 0, 0);

end;

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure MouseCircle(Radius, CX, CY: Integer; TypeC: ClickActions);

Contributors: Zyt3x, Wanted.

Description: Clicks/moves the mouse in a circle with a specified radius.

Date Created: September 4th, 2011. By Zyt3x & Wanted.

Last Modification: September 18th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure MouseCircle(Radius, CX, CY: Integer; TypeC: ClickActions);

var

P: TPoint;

begin

P := RCirclePoint(Radius, CX, CY);

case TypeC of

ClickLeft: Mouse(P.X, P.Y, 0, 0, True);

ClickRight: Mouse(P.X, P.Y, 0, 0, False);

MoveTo: MMouse(P.X, P.Y, 0, 0);

end;

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure DragMouse(sX, sY, sRX, sRY, eX, eY, eRX, eRY: Integer; Left: Boolean);

Contributors: Naum, Wanted.

Description: Clicks and holds the mouse and then drags it and releases it.

Date Created: August 7th, 2011. By Naum

Last Modification: August 19th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure DragMouse(sX, sY, sRX, sRY, eX, eY, eRX, eRY: Integer; Left: Boolean);

var

cx, cy: Integer;

begin

MMouse(sX, sY, sRX, sRY);

WaitRR(60, 90);

GetMousePos(cx, cy);

HoldMouse(cx, cy, Left);

WaitRR(80, 120);

MMouse(eX, eY, eRX, eRY);

WaitRR(60, 90);

GetMousePos(cx, cy);

ReleaseMouse(cx, cy, Left);

WaitRR(100, 200);

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure DragMouseBox(sX1, sY1, sX2, sY2, eX1, eY1, eX2, eY2: Integer; Left: Boolean);

Contributors: Wanted

Description: See DragMouse. Except for does in box areas.

Date Created: August 19th, 2011. By Wanted

Last Modification: August 19th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure DragMouseBox(sX1, sY1, sX2, sY2, eX1, eY1, eX2, eY2: Integer; Left: Boolean);

var

cx, cy: Integer;

begin

MouseBox(sX1, sY1, sX2, sY2, MoveTo);

WaitRR(60, 90);

GetMousePos(cx, cy);

HoldMouse(cx, cy, Left);

WaitRR(80, 120);

MouseBox(eX1, eY1, eX2, eY2, MoveTo);

WaitRR(60, 90);

GetMousePos(cx, cy);

ReleaseMouse(cx, cy, Left);

WaitRR(100, 200);

end;[/sCAR]

 

I hope this helps.

 

Once OSI beta is out you can utilize these with OSI.

 


 

procedure DragMouse(sX, sY, sRX, sRY, eX, eY, eRX, eRY: Integer; Left: Boolean);

var

cx, cy: Integer;

begin

MMouse(sX, sY, sRX, sRY);

WaitRR(60, 90);

GetMousePos(cx, cy);

HoldMouse(cx, cy, Left);

WaitRR(80, 120);

MMouse(eX, eY, eRX, eRY);

WaitRR(60, 90);

GetMousePos(cx, cy);

ReleaseMouse(cx, cy, Left);

WaitRR(100, 200);

end;

 

 

 

how come that doesn't work

Link to comment
Share on other sites

DragMouse in OSI mouse functions

 

[sCAR]{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Official SCAR Include

Mouse Routines

--------------------------------------------------------------------------------

* procedure MMouse(x, y, rx, ry: Integer);

By: Timer

* procedure HoldMouseWait(x, y, rx, ry, MinTime, MaxTime: Integer; Left: Boolean);

By: Wanted

* procedure Mouse(x, y, rx, ry: Integer; Left: Boolean);

By: Anonymous

* procedure HoldMouseWaitBox(x1, y1, x2, y2, MinTime, MaxTime: Integer; Left: Boolean);

By: Wanted

* procedure MouseBox(x1, y1, x2, y2: Integer; TypeC: ClickActions);

By: Anonymous

* procedure MouseCircle(Radius, CX, CY: Integer; TypeC: ClickActions);

By: Zyt3x & Wanted.

* procedure DragMouse(sX, sY, sRX, sRY, eX, eY, eRX, eRY: Integer; Left: Boolean);

By: Naum

* procedure DragMouseBox(sX1, sY1, sX2, sY2, eX1, eY1, eX2, eY2: Integer; Left: Boolean);

By: Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure MMouse(x, y, rx, ry: Integer);

Contributors: Timer, Wanted.

Description: Moves the mouse humanly.

Date Created: August 7th, 2011. By Timer

Last Modification: September 18th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure MMouse(x, y, rx, ry: Integer);

var

P: TPoint;

begin

P := RRectanglePoint(X - RX, Y - RY, X + RX, Y + RY);

if (not (MouseSpeed = 0)) then

MoveWindMouseEx(P.X, P.Y, 0, 0, MouseSpeed)

else

MoveWindMouse(P.X, P.Y, 0, 0);

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure HoldMouseWait(x, y, rx, ry, MinTime, MaxTime: Integer; Left: Boolean);

Contributors: Wanted, Timer, Anonymous.

Description: Moves the mouse and clicks + holds humanly.

Date Created: August 19th, 2011. By Wanted

Last Modification: August 19th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure HoldMouseWait(x, y, rx, ry, MinTime, MaxTime: Integer; Left: Boolean);

var

cx, cy: Integer;

begin

MMouse(x, y, rx, ry);

WaitRR(60, 90);

GetMousePos(cx, cy);

HoldMouse(cx, cy, Left);

WaitRR(MinTime, MaxTime);

GetMousePos(cx, cy);

ReleaseMouse(cx, cy, Left);

WaitRR(100, 200);

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure Mouse(x, y, rx, ry: Integer; Left: Boolean);

Contributors: Anonymous, Timer, Wanted.

Description: Moves the mouse and clicks humanly.

Date Created: August 7th, 2011. By Anonymous

Last Modification: August 19th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure Mouse(x, y, rx, ry: Integer; Left: Boolean);

begin

HoldMouseWait(x, y, rx, ry, 80, 120, Left);

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure HoldMouseWaitBox(x1, y1, x2, y2, MinTime, MaxTime: Integer; Left: Boolean);

Contributors: Wanted

Description: Moves the mouse and clicks + holds humanly.

Date Created: August 19th, 2011. By Wanted

Last Modification: September 18th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure HoldMouseWaitBox(x1, y1, x2, y2, MinTime, MaxTime: Integer; Left: Boolean);

var

P: TPoint;

begin

P := RRectanglePoint(X1, Y1, X2, Y2);

HoldMouseWait(P.X, P.Y, 0, 0, MinTime, MaxTime, Left);

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure MouseBox(x1, y1, x2, y2: Integer; TypeC: ClickActions);

Contributors: Anonymous, Timer, Wanted.

Description: Clicks/moves the mouse in a specified area.

Date Created: August 7th, 2011. By Anonymous

Last Modification: September 18th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure MouseBox(x1, y1, x2, y2: Integer; TypeC: ClickActions);

var

P: TPoint;

begin

P := RRectanglePoint(X1, Y1, X2, Y2);

case (TypeC) of

ClickLeft: Mouse(P.X, P.Y, 0, 0, True);

ClickRight: Mouse(P.X, P.Y, 0, 0, False);

MoveTo: MMouse(P.X, P.Y, 0, 0);

end;

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure MouseCircle(Radius, CX, CY: Integer; TypeC: ClickActions);

Contributors: Zyt3x, Wanted.

Description: Clicks/moves the mouse in a circle with a specified radius.

Date Created: September 4th, 2011. By Zyt3x & Wanted.

Last Modification: September 18th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure MouseCircle(Radius, CX, CY: Integer; TypeC: ClickActions);

var

P: TPoint;

begin

P := RCirclePoint(Radius, CX, CY);

case TypeC of

ClickLeft: Mouse(P.X, P.Y, 0, 0, True);

ClickRight: Mouse(P.X, P.Y, 0, 0, False);

MoveTo: MMouse(P.X, P.Y, 0, 0);

end;

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure DragMouse(sX, sY, sRX, sRY, eX, eY, eRX, eRY: Integer; Left: Boolean);

Contributors: Naum, Wanted.

Description: Clicks and holds the mouse and then drags it and releases it.

Date Created: August 7th, 2011. By Naum

Last Modification: August 19th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure DragMouse(sX, sY, sRX, sRY, eX, eY, eRX, eRY: Integer; Left: Boolean);

var

cx, cy: Integer;

begin

MMouse(sX, sY, sRX, sRY);

WaitRR(60, 90);

GetMousePos(cx, cy);

HoldMouse(cx, cy, Left);

WaitRR(80, 120);

MMouse(eX, eY, eRX, eRY);

WaitRR(60, 90);

GetMousePos(cx, cy);

ReleaseMouse(cx, cy, Left);

WaitRR(100, 200);

end;

 

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

procedure DragMouseBox(sX1, sY1, sX2, sY2, eX1, eY1, eX2, eY2: Integer; Left: Boolean);

Contributors: Wanted

Description: See DragMouse. Except for does in box areas.

Date Created: August 19th, 2011. By Wanted

Last Modification: August 19th, 2011. By Wanted

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

 

procedure DragMouseBox(sX1, sY1, sX2, sY2, eX1, eY1, eX2, eY2: Integer; Left: Boolean);

var

cx, cy: Integer;

begin

MouseBox(sX1, sY1, sX2, sY2, MoveTo);

WaitRR(60, 90);

GetMousePos(cx, cy);

HoldMouse(cx, cy, Left);

WaitRR(80, 120);

MouseBox(eX1, eY1, eX2, eY2, MoveTo);

WaitRR(60, 90);

GetMousePos(cx, cy);

ReleaseMouse(cx, cy, Left);

WaitRR(100, 200);

end;[/sCAR]

 

I hope this helps.

 

Once OSI beta is out you can utilize these with OSI.

 


 

procedure DragMouse(sX, sY, sRX, sRY, eX, eY, eRX, eRY: Integer; Left: Boolean);

var

cx, cy: Integer;

begin

MMouse(sX, sY, sRX, sRY);

WaitRR(60, 90);

GetMousePos(cx, cy);

HoldMouse(cx, cy, Left);

WaitRR(80, 120);

MMouse(eX, eY, eRX, eRY);

WaitRR(60, 90);

GetMousePos(cx, cy);

ReleaseMouse(cx, cy, Left);

WaitRR(100, 200);

end;

 

how come that doesn't work

 

 

 

OSI functions need the rest of OSI to compile.

 

You may be able to look at them and learn how to do it yourself though.

Link to comment
Share on other sites

Isn't it

Program new;

Begin

HoldMouse(x, y, true);

MoveMouseSmooth(x, y);

ReleaseMouse(x, y, true);

End

 

I'm only doing this to prove to myself that I know how lol

 

Use OSI

 

{.include OSI\OSI.scar}

begin
 SetUpOSI;
 DragMouse(123, 123, 0, 0, 321, 321, 0, 0, True);
end.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...