Mouse

Mouse routines.

WindMouse

procedure WindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended);

Moves the mouse along a spline defined by

Note

by Benland100

Example:

MMouse

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

Moves the mouse. rx and ry are total range of the randomness for the mouse. i.e. if rx:=6 then the randomness of the mouse will be from x-3 to x+3.

Note

by Benland100, laptop mouse by Hobbit (and nielsie95)

Example:

ClickMouse2

procedure ClickMouse2(button: variant);

Clicks the mouse in a human way on the current mouse spot.

Note

by SRL Community

Example:

Mouse

procedure Mouse(mousex, mousey, ranx, rany: Integer; button: variant);

Moves then clicks mouse (will only move if ‘mouse_move’ passed).

Note

by Mutant Squirrle, Harry

Example:

MouseBox

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

Moves mouse into a random position in the box. Clicks if told to.

Note

by Nava2

Example:

MouseTBox

procedure MouseTBox(Box: TBox; ClickType: variant);

Moves the mouse to the Indicated Box, and performs the ClickType

Note

by PhaseCode

Example:
Mouse(InvBox(1),1);

SleepAndMoveMouse

procedure SleepAndMoveMouse(Time: Integer);

Waits for specified time and moves mouse around like bored human would.

Note

by RsN

Example:

IdleTime

procedure IdleTime(Time, Rand: integer; Gravity: extended);

Randomly moves the mouse (Rand, and Gravity) for Time milliseconds

Note

by BenLand100

Example:

SpiralMouseMulti

function SpiralMouseMulti(var fx, fy: Integer; x1, y1, x2, y2: Integer; UpText: TStringArray; PpC, aInc: Integer): Boolean;

Spirals the mouse in a circle from the center of the defined box. It will continue to spiral until it finds a spiral completely outside the box, always skipping points outside. Returns the occurance of the first occurance of UpText into fx, fy. Takes multiple UpTexts as a TStringArray. PpC: The number of pixels to increase per spiral. aInc: The number of stops to make around each spiral. Takes some testing to get the right combination of PpC and aInc.

Note

by Nava2

Example:

SpiralMouse

function SpiralMouse(var fx, fy: Integer; x1, y1, x2, y2: Integer; UpText: String; PpC, aInc: Integer): Boolean;

Spirals the mouse in a circle from the center of the defined box. It will continue to spiral until it finds a spiral completely outside the box, always skipping points outside. Returns the occurance of the UpText into fx, fy. See SpiralMouseMulti for more information .. note:

by Nava2

Example:

DidClick

function DidClick(Red: Boolean; Time: integer): boolean;

Checks for the X after a click, Times Out after Time. DidClick Time must be at LEAST 200 now.

Note

by Rasta Magician Modded by Narcle on Feb. 4th, 2012

Example:

DidRedClick

function DidRedClick: Boolean;

Checks for the Red X after a Click, Times out after 500 ms

Note

by Rasta Magician

Example:

DidYellowClick

function DidYellowClick: Boolean;

Checks for the Yellow X after a Click, Times out after 500 ms

Note

by Rasta Magician

Example:

MouseOval

procedure MouseOval(cx, cy, mx, my, clickType: Integer);
Clicks a random point within an oval shape.
  • cx, cy: The center point of the oval.
  • rx, ry: X and Y radius of the oval.
  • clickType: mouse_Move, mouse_Left, mouse_Right, or mouse_Middle.

Note

by mixster Last Updated: Unknown.

Example:

MouseCircle

procedure MouseCircle(MidX, MidY, Radius, clickType: Integer);

Same as MouseOval, but clicks within a circle instead.

Note

by mixster Last Updated: Mar. 21st, 2012 by Coh3n

Example:

MouseBoxEx

procedure MouseBoxEx(x1, y1, x2, y2: Integer; Dist,ClickType: Integer);

Does mouse stuff (ClickType), and uses a point that is within Dist from the closest point between mouse and the box.

Note

by Raymond

Example:

DragMouse

procedure DragMouse(StartX, StartY, SRandX, SRandY, EndX, EndY, ERandX, ERandY: Integer);

Leftclicks StartX, StartY and drags mouse to EndX, EndY.

Note

by NaumanAkhlaQ

Example:

DragMouseTBox

procedure DragMouseTBox(StartBox, EndBox: TBox);

Left clicks a point within StartBox and drags mouse to a point within EndBox, of which the points selected follows a normal distribution from the centre of the box.

Note

by riwu, modelled after DragMouse by NaumanAkhlaQ

Example: