Difference between revisions of "ClickWindMouse"
From SCAR Divi Manual
(→Definition) |
(→Definition) |
||
| Line 20: | Line 20: | ||
i := i + 1; | i := i + 1; | ||
until (i > 4); | until (i > 4); | ||
| − | |||
ReleaseMouse(xx, yy, left); | ReleaseMouse(xx, yy, left); | ||
Wait(100 + Random(100)); | Wait(100 + Random(100)); | ||
Revision as of 09:49, 6 July 2011
Definition
procedure ClickWindMouse(x, y, rx, ry: Integer; Left: Boolean);
Source Code
procedure ClickWindMouse(x, y, rx, ry: Integer; Left: Boolean);
var
i: Integer;
xx, yy: Integer;
begin
MoveWindMouse(x, y, rx, ry);
Wait(60 + Random(30));
GetMousePos(xx, yy);
HoldMouse(xx, yy, left);
i := 0;
repeat
Wait(20 + Random(30));
i := i + 1;
until (i > 4);
ReleaseMouse(xx, yy, left);
Wait(100 + Random(100));
end;Availability
SCAR Divi 3.21 > Current
Description
This function moves the cursor in a "human-like" pattern to a coordinate (x, y) relative to the selected client window randomized within a range specified for each coordinate by rx and ry, after which it clicks there in a human-like way. If Left is true, the function will generate a left button click, if Left is false, a right button click.
Example
begin ClickWindMouse(500, 500, 100, 100, False); end.