Difference between revisions of "ClickWindMouse"

From SCAR Divi Manual
Jump to: navigation, search
(Definition)
 
(4 intermediate revisions by the same user not shown)
Line 27: Line 27:
  
 
==Availability==
 
==Availability==
SCAR Divi 3.21 > Current
+
SCAR Divi 3.21 > 3.34
  
 
==Description==
 
==Description==
Line 40: Line 40:
  
 
==See Also==
 
==See Also==
*[[MouseBox]]
+
*[[ClickMouseBox]]
 
*[[MoveWindMouse]]
 
*[[MoveWindMouse]]
 
*[[MoveWindMouseEx]]
 
*[[MoveWindMouseEx]]
 
*[[ClickMouse]]
 
*[[ClickMouse]]
  
[[Category:Functions]]
+
[[Category:Deprecated Functions]]
[[Category:Mouse Functions]]
 

Latest revision as of 12:35, 8 September 2012

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);
  GetMousePos(xx, yy);
  ReleaseMouse(xx, yy, left);
  Wait(100 + Random(100));
end;

Availability

SCAR Divi 3.21 > 3.34

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.

See Also