Name: mouseClick

Type: function

Syntax: the mouseClick

Syntax: mouseClick()

Summary:
<return|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).

Introduced: 1.0

OS: mac, windows, linux, ios, android

Platforms: desktop, server, mobile

Example:
the mouseClick

Example:
wait until the mouseClick

Returns (bool):
The <mouseClick> <function> <return|returns> true or false.

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(constant)> true.

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

References: click (command), return (constant),
function (control structure), clickLoc (function), mouse (function),
mouseLoc (function), handler (glossary), mouse button (glossary),
event (glossary), trigger (glossary), return (glossary),
mouseDown (message), mouseUp (message)

Tags: ui

