User Tools

Site Tools


en:clickb

This is an old revision of the document!


Clickb (Function)

Format

clickb
clickb ( )

returns integer_expression

Description

Returns the buttons that the user last clicked on the mouse (if over the graphic output). Returns 0 if no click has been recorded. If multiple buttons have been pressed the value is the sum of the values for all pressed buttons.

Return Values
ValueMouse Button Pressed
0None
1Left
2Right
4Center

Example

# clear any prior mouse click
clickclear
# wait for the user to click the mouse
print "click mouse on the graphics output"
while clickb = 0
  pause .01
endwhile
# show where the user clicked
print "The user clicked at (" + clickx + "," + clicky + ")"

See Also

2016/01/01 22:42

History

0.9.4dNew To Version
en/clickb.1471027900.txt.gz · Last modified: 2020/02/28 10:46 (external edit)