HTBasic Help
×
Menu
Index

READ LOCATOR

Reads the locator device without waiting for a digitize operation.
 
 READ LOCATOR x-variable,y-variable [,string-name$]
 
Usage:
READ LOCATOR X,Y
READ LOCATOR Xcoor,Ycoor,Position$
Description:
The locator device position is read into the X and Y variables without waiting for a digitize operation. The current GRAPHICS INPUT IS device coordinates are in default units or the units defined in a WINDOW or SHOW statement. The optional string variable will receive the 8 byte status message defined as follows:
Byte
Meaning
1
Button Status - Status of the digitizing button on the locator. If the character is a "1", then the button is pressed; if it is a "0", then the button is not pressed.
2
Comma delimiter character.
3
Clip Indicator - If the character is a "0", then the point is outside the hard-clip limits. If a "1", the point is inside the hard-clip limits, but outside the soft-clip limits (clipping rectangle - see CLIP). If a "2" then it's inside the soft-clip limits
4
Comma delimiter character
5
Tracking ON/OFF - If the character is a "0", then tracking is off; if a "1", then tracking is on.
6
Comma delimiter character.
7-8
Button Positions - If S$ is the status string and B is the button number you wish to test, then BIT( VAL(S$[7,8]), B-1) returns one if B is down and zero if B is up.
See Also: