Difference between revisions of "ClickMouse"

From SCAR Divi Manual
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
==Definition==
 
==Definition==
 
<source lang="scar" lines="false">
 
<source lang="scar" lines="false">
procedure ClickMouse(x, y: Integer; Left: Boolean);
+
procedure ClickMouse(const X, Y: Integer; const Btn: TMouseButton);
 
</source>
 
</source>
  
 
==Availability==
 
==Availability==
 
SCAR Divi 3.00 > Current
 
SCAR Divi 3.00 > Current
 +
 +
*Before 3.35 the '''Btn''' parameter was a [[Boolean]] with Left = True and Right = False.
  
 
==Description==
 
==Description==
Generates a mouse click at the specified coordinate ('''x''', '''y''') relative to the selected client window. If '''Left''' is [[true]], the generated click will be a left click, if '''Left''' is [[false]], it will be a right click. In the event that the current cursor position does not equal that of the given coordinates, the function will call [[MoveMouse]] to set the cursor position to the given coordinate.
+
Generates a mouse click at the specified coordinate ('''X''', '''Y''') relative to the active client window. The given [[TMouseBtn]] '''Btn''' indicates what mouse button has to be used. In the event that the current cursor position does not equal that of the given coordinates, the function will call [[SetMousePos]] to set the cursor position to the given coordinate. An extended function with additional functionality is available as [[ClickMouseEx]].  
  
 
==Example==
 
==Example==
 
<source lang="scar">
 
<source lang="scar">
 
begin
 
begin
   ClickMouse(500, 500, False);
+
   ClickMouse(500, 500, mbRight);
 
end.
 
end.
 
</source>
 
</source>
  
 
==See Also==
 
==See Also==
*[[ClickMouseBox]]
+
*[[ClickMouseEx]]
*[[ClickMouseMid]]
+
*[[MouseBtnDown]]
*[[HoldMouse]]
+
*[[MouseBtnUp]]
*[[ReleaseMouse]]
+
*[[SetMousePos]]
*[[MoveMouse]]
 
  
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Mouse Functions]]
 
[[Category:Mouse Functions]]

Latest revision as of 12:25, 8 September 2012

Definition

procedure ClickMouse(const X, Y: Integer; const Btn: TMouseButton);

Availability

SCAR Divi 3.00 > Current

  • Before 3.35 the Btn parameter was a Boolean with Left = True and Right = False.

Description

Generates a mouse click at the specified coordinate (X, Y) relative to the active client window. The given TMouseBtn Btn indicates what mouse button has to be used. In the event that the current cursor position does not equal that of the given coordinates, the function will call SetMousePos to set the cursor position to the given coordinate. An extended function with additional functionality is available as ClickMouseEx.

Example

begin
  ClickMouse(500, 500, mbRight);
end.

See Also