Mouse ===== Mouse routines. WindMouse ~~~~~~~~~ .. code-block:: pascal procedure WindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended); .. note:: by Benland100 Example: .. code-block:: pascal MMouse ~~~~~~ .. code-block:: pascal procedure MMouse(x, y, rx, ry: integer); Moves the mouse. .. note:: by Benland100, laptop mouse by Hobbit (and nielsie95) Example: .. code-block:: pascal MouseAction ~~~~~~~~~~~ .. code-block:: pascal function MouseAction(left: boolean): integer; Converts the (SCAR) boolean for mouse button the the Simba integer for the button .. note:: by Simba development .. note:: This should probably be removed. Example: .. code-block:: pascal ClickMouse2 ~~~~~~~~~~~ .. code-block:: pascal procedure ClickMouse2(left : boolean); Clicks the mouse in a human way on the current mouse spot. .. note:: by SRL Community Example: .. code-block:: pascal Mouse ~~~~~ .. code-block:: pascal procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean); Moves then clicks mouse. .. note:: by Mutant Squirrle, with a small fix by hy71194 Example: .. code-block:: pascal SleepAndMoveMouse ~~~~~~~~~~~~~~~~~ .. code-block:: pascal procedure SleepAndMoveMouse(Time: Integer); Waits for specified time and moves mouse around like bored human would. .. note:: by RsN Example: .. code-block:: pascal IdleTime ~~~~~~~~ .. code-block:: pascal procedure IdleTime(Time, Rand: integer; Gravity: extended); Randomly moves the mouse (Rand, and Gravity) for Time milliseconds .. note:: by BenLand100 Example: .. code-block:: pascal SpiralMouseMulti ~~~~~~~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal SpiralMouse ~~~~~~~~~~~ .. code-block:: pascal 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. 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: .. code-block:: pascal DidClick ~~~~~~~~ .. code-block:: pascal function DidClick(Red: Boolean; Time: integer): boolean; Checks for the X after a click, Times Out after Time. .. note:: by Rasta Magician Example: .. code-block:: pascal DidRedClick ~~~~~~~~~~~ .. code-block:: pascal function DidRedClick: Boolean; Checks for the Yellow X after a Click, Times out after 500 ms .. note:: by Rasta Magician Example: .. code-block:: pascal DidYellowClick ~~~~~~~~~~~~~~ .. code-block:: pascal function DidYellowClick: Boolean; Checks for the Yellow X after a Click, Times out after 500 ms .. note:: by Rasta Magician Example: .. code-block:: pascal MouseOval ~~~~~~~~~ .. code-block:: pascal procedure MouseOval(cx, cy, mx, my, clickType: Integer); Clicks a random point within an oval shape. The size of the oval is defined by cx, cy, mx and my and clickType takes same parameters as MouseBox. .. note:: by mixster Example: .. code-block:: pascal MouseCircle ~~~~~~~~~~~ .. code-block:: pascal procedure MouseCircle(MidX, MidY, Radius, clickType: Integer); Same as MouseOval, but clicks within a circle instead. .. note:: by mixster Example: .. code-block:: pascal MouseBoxEx ~~~~~~~~~~ .. code-block:: pascal 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: .. code-block:: pascal DragMouse ~~~~~~~~~ .. code-block:: pascal procedure DragMouse(StartX, StartY, SRandX, SRandY, EndX, EndY, ERandX, ERandY: Integer); Leftclicks StartX, StartY and drags mouse to EndX, EndY. .. note:: by NaumanAkhlaQ Example: .. code-block:: pascal