GET MOUSE Statement
GET MOUSE numvar, numvar, numvar
GET MOUSE: numvar, numvar, numvar
The GET MOUSE statement returns the current position of the mouse and its current state. On mice with multiple
buttons, only the state and position of the left-most button is reported. The current x- and y-coordinates of the current
position, in user coordinates, are assigned to the first two numvars, respectively. If one or more picture
transformations are in effect, their inverse is applied before assigning to the variables. The current state of the mouse is
assigned to the third numvar according to the following table:
Mouse State
Value-------Mouse state
0 No button Down
1 Button Down
2 Button clicked at this point
3 Button released at this point
4 Button shift-clicked at this point
The values assigned to the two variables may be outside the current logical window; they are not "clipped" and are
given in terms of the current user coordinates.
The state of the mouse is determined within a certain time interval that is dependent on the particular machine. Thus,
even if the GET MOUSE statement is executed continuously, as within a tight loop, it may nonetheless miss the exact
moments when the button is being clicked or released.
GET MOUSE is provided primarily for compatibility with earlier versions of True BASIC. This version of the
language provides more reliable and flexible means of getting mouse input via the Sys_Event routine (see Chapter 20
"Sys_Event Subroutine") or the TC_Event library routine (see Chapter 14 "Interface Elements"). The GET MOUSE
statement will not work if program-controlled event handling (via Sys_Event or TC_Event) is in effect.