CapsLock | User Interactive |
Declaration:
FUNCTION CapsLock
:BOOLEAN ; Description:
CapsLock returns TRUE if the Caps Lock was depressed during the last user event. This function operates with the MouseDown, KeyDown, and AutoKey calls.
Command | User Interactive |
Declaration:
FUNCTION Command
:BOOLEAN ; Description:
Command returns TRUE if the Command key (Mac) or Control key (Windows) was depressed during the last user event. This function operates with the MouseDown, KeyDown, and AutoKey calls.
GetKeyDown | User Interactive |
Declaration:
PROCEDURE GetKeyDown
( VAR asciiCode:LONGINT ) ; Description:
Procedure GetKeyDown pauses execution of a VectorScript routine until a key is pressed by the user. When the key is pressed, the ASCII code of the key is returned.
Parameters:
asciiCode ASCII code of key pressed. Example:
GetLine | User Interactive |
Declaration:
PROCEDURE GetLine
( VAR p1X :REAL; VAR p1Y :REAL; VAR p2X :REAL; VAR p2Y :REAL ) ; Description:
Procedure GetLine draws a temporary "rubberband" line between two user selected points.Parameters:
p1 Returns coordinates of first user click. p2 Returns coordinates of second user click.
GetMouse | User Interactive |
Declaration:
PROCEDURE GetMouse
( VAR pX :REAL; VAR pY :REAL ) ; 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.
Parameters:
p Returns current mouse coordinates. Example:
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}
GetPt | User Interactive |
Declaration:
PROCEDURE GetPt
( VAR pX :REAL; VAR pY :REAL ) ; Description:
Procedure GetPt switches the cursor to selection mode and allows the user to select a point in a VectorWorks document.
Parameters:
p Returns coordinates of mouse click.
GetPtL | User Interactive |
Declaration:
PROCEDURE GetPtL
( pX :REAL; pY :REAL; VAR pX :REAL; VAR pY :REAL ) ; Description:
Procedure GetPtL creates a temporary "rubberband" line from a specified point to the user selected end point.Parameters:
p Coordinates of line start point. p Returns coordinates of mouse click. Example:
GetPtL(StartX,StartY,ClickX,ClickY);
GetRect | User Interactive |
Declaration:
PROCEDURE GetRect
( VAR p1X :REAL; VAR p1Y :REAL; VAR p2X :REAL; VAR p2Y :REAL ) ; Description:
Procedure GetRect draws a temporary "rubberband" rectangle onscreen, similar to a selection marquee. The user defines the rectangle by selecting two points which define the top left and bottom right of the rectangle.Parameters:
p1 Returns coordinates of first user click. p2 Returns coordinates of second user click. Example:
KeyDown | User Interactive |
Declaration:
FUNCTION KeyDown
( VAR asciiCode:LONGINT ) :BOOLEAN ; Description:
Function KeyDown returns TRUE if a non-modifier keyboard character has been depressed. When TRUE is returned, the ASCII code of the character is returned.
Modifier keys are the Caps Lock, Command, Control, Option, and Shift keys.
Parameters:
asciiCode ASCII code of key pressed. Example:
WHILE NOT KeyDown(keyHit) DO BEGIN SysBeep; SysBeep; END; Message('The key pressed was ',keyHit); {an annoying example of one use of the KeyDown function}
MouseDown | User Interactive |
Declaration:
FUNCTION MouseDown
( VAR pX :REAL; VAR pY :REAL ) :BOOLEAN ; Description:
Function MouseDown returns TRUE if a mouse down event has occurred within the active document window.
Parameters:
p Returns coordinates of mouse click. Example:
REPEAT UNTIL MouseDown(x1,y1); REPEAT UNTIL MouseDown(x2,y2); MoveTo(x1,y1); LineTo(x2,y2);
Option | User Interactive |
Declaration:
FUNCTION Option
:BOOLEAN ; Description:
Option return TRUE if the Option key (Mac) or Alt key (Windows) was depressed during the last user event. This function operates with the MouseDown, KeyDown, and AutoKey calls.
SetCursor | User Interactive |
Declaration:
PROCEDURE SetCursor
( cursor:INTEGER ) ; Description:
Procedure SetCursor changes the appearance of the screen cursor.
Table - Cursor Styles
Cursor Style Style Flag Large Cross LgCrossC Small Cross SmCrossC Watch WatchC Text Bar TextBarC Arrow ArrowC Hand HandC
Parameters:
cursor Cursor style setting. Example:
SetCursor(LgCrossC);
Shift | User Interactive |
Declaration:
FUNCTION Shift
:BOOLEAN ; Description:
Shift returns TRUE if the Shift key was depressed during the last user event. This function operates with the MouseDown, KeyDown, and AutoKey calls.