Skip to content

Latest commit

 

History

History
46 lines (37 loc) · 885 Bytes

File metadata and controls

46 lines (37 loc) · 885 Bytes

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))

Version

Availability: from All Versions

Category