mouseClick

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the mouseClick
mouseClick()
Summary

Returns true if the user has clicked since the event that caused the current handler to run (or since the last time the mouseClick was checked).

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
the mouseClick
wait until the mouseClick
Values
NameTypeDescription
return

The mouseClick function returns true or false.

RelatedConstant: return
Message: mouseDown, mouseUp
Command: click
Function: clickLoc, mouse, mouseLoc
Control Structure: function
Glossary: handler, mouse button, event, trigger, return
Description

Use the mouseClick function to keep track of clicks, or to trigger some action within a handler when the user clicks.

On systems with multi-button mice, the mouseClick function tracks mouse button 1. Clicking mouse button 2 or 3 does not affect the value of the mouseClick.

Clicks generated by the click command do not affect the mouseClick function. Only an actual click can cause the mouseClick to return true.

Checking the mouseClick function clears any previous clicks. If the user clicks, and then the mouseClick is called, it returns true. If the mouseClick is then called again (and the user hasn't clicked again meanwhile), the function returns false.

Tagsui