Skip to content

Latest commit

 

History

History
68 lines (58 loc) · 1.43 KB

File metadata and controls

68 lines (58 loc) · 1.43 KB

GetMouse

Description

Procedure GetMouse tracks and returns the current location of the cursor within the active VectorWorks document, allowing the cursor coordinates to be returned dynamically while moving the cursor onscreen.

PROCEDURE GetMouse(VAR pX,pY : REAL);
def vs.GetMouse():
    return p

Parameters

Name Type Description
p REAL Returns current mouse coordinates.

Remarks

This function does not return accurate position of the mouse on the current 2D plane when in a 3D view.

Examples

VectorScript

BEGIN
WHILE NOT KeyDown(aCode) DO
BEGIN
GetMouse(CursX,CursY);
Message('X : ',CursX,' Y : ',CursY);
END;
END;
{displays the cursor coordinates as it is moved around onscreen}

Python

def Example():
	isKeyDown, alakiCode = vs.KeyDown()
	while not(isKeyDown):
		CursPt = vs.GetMouse()
		vs.Message('X : ',CursPt[0],' Y : ',CursPt[1])
		isKeyDown, alakiCode = vs.KeyDown()
Example()
BEGIN
SetCursor (ArrowC);
GetMouse (x, y);
x := x - kX0;
IF x < 0 THEN
BEGIN
	xB_S := Num2Str( numDecPlaces( deltaX ), 0 );
import vs

# Procedure GetMouse tracks and returns the current location of the cursor
# within the active VectorWorks document, allowing the cursor coordinates to
# be return.
result = vs.GetMouse()

Version

Availability: from All Versions

Category