Difference between revisions of "MouseBtnDown"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> procedure HoldMouse(x, y: Integer; Left: Boolean); </source> ==Availability== SCAR Divi 3.00 > Current ==Description== Holds a...")
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Definition==
 
==Definition==
 
<source lang="scar" lines="false">
 
<source lang="scar" lines="false">
procedure HoldMouse(x, y: Integer; Left: Boolean);
+
procedure MouseBtnDown(const X, Y: Integer; const Btn: TMouseButton);
 
</source>
 
</source>
  
 
==Availability==
 
==Availability==
SCAR Divi 3.00 > Current
+
SCAR Divi 3.35 > Current
 +
 
 +
===Aliases===
 +
*HoldMouse (SCAR Divi 3.00 > 3.34)
  
 
==Description==
 
==Description==
Holds a mouse button at the specified coordinate ('''x''', '''y''') relative to the selected client window. If '''Left''' is [[true]], the left button will be held, if '''Left''' is [[false]] the right button will be held. 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.
+
Holds a mouse button down at the specified coordinate ('''X''', '''Y''') relative to the selected 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 [[MoveMouse]] to set the cursor position to the given coordinate.
  
 
==Example==
 
==Example==
 
<source lang="scar">
 
<source lang="scar">
 
begin
 
begin
   HoldMouse(500, 500, False);
+
   MouseBtnDown(500, 500, mbRight);
 
   Wait(100);
 
   Wait(100);
   ReleaseMouse(500, 500, False);
+
   MouseBtnUp(500, 500, mbRight);
 
end.
 
end.
 
</source>
 
</source>
  
 
==See Also==
 
==See Also==
*[[ReleaseMouse]]
+
*[[MouseBtnUp]]
 
*[[ClickMouse]]
 
*[[ClickMouse]]
*[[MoveMouse]]
+
*[[SetMousePos]]
  
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Mouse Functions]]
 
[[Category:Mouse Functions]]

Latest revision as of 13:35, 8 September 2012

Definition

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

Availability

SCAR Divi 3.35 > Current

Aliases

  • HoldMouse (SCAR Divi 3.00 > 3.34)

Description

Holds a mouse button down at the specified coordinate (X, Y) relative to the selected 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 MoveMouse to set the cursor position to the given coordinate.

Example

begin
  MouseBtnDown(500, 500, mbRight);
  Wait(100);
  MouseBtnUp(500, 500, mbRight);
end.

See Also