Skip to content

Latest commit

 

History

History
64 lines (52 loc) · 1.27 KB

File metadata and controls

64 lines (52 loc) · 1.27 KB

MouseDown

Description

Return TRUE if a mouse down event has occurred within the active document window.

FUNCTION MouseDown(VAR pX,pY : REAL): BOOLEAN;
def vs.MouseDown():
    return (bool, (px, py))

Parameters

Name Type Description
p REAL Coordinates of mouse click.

Remarks

This function returns a 2-dimensional point on the screen plane.

Examples

VectorScript

REPEAT
UNTIL MouseDown(x1,y1);
REPEAT
UNTIL MouseDown(x2,y2);
MoveTo(x1,y1);
LineTo(x2,y2);

Python

down = False
while not down:
    down, pt = vs.MouseDown()  # pt is a tuple (x, y)

vs.AlrtDialog(str(pt))
		HRotate (followerH, x, y, -angle);
		HMove (camH, -x, -y);
		HMove (followerH, -x, -y);
	END;	{of dTheta <> 0}
UNTIL KeyDown( cCode ) | MouseDown (xM, yM);

UNTIL KeyDown (cCode) | MouseDown (xM, yM);
import vs

# Return TRUE if a mouse down event has occurred within the active document
# window.
bool, (px, py = vs.MouseDown()
vs.Message('MouseDown returned: ' + str((bool, (px, py)))

Version

Availability: from All Versions

Category