FANDOM


Syntax

BUTTON? 1, 2 or 3

Explanation

BUTTON? outputs the state of the left or right mouse button. The number given as its input is 1 for the left button, 2 for the right button or 3 for the middle button. The output is TRUE when the button is depressed, or FALSE when the button is not depressed or when no mouse is found.

See also MOUSE and .MOUSEON.

Example

TO CHECK.MOUSE

IF BUTTON? 1 THEN PRINT [LEFT BUTTON WAS PRESSED.]
IF BUTTON? 2 THEN PRINT [RIGHT BUTTON WAS PRESSED.]
CHECK.MOUSE

END

Use Control G to stop this procedure.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.