clickLoc

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the clickLoc
clickLoc()
Summary

Returns the position of the most recent mouse click.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, mobile
Example
the clickLoc
if the clickLoc is the mouseLoc then send mouseUp to me
Values
NameTypeDescription
return

The clickLoc function returns two integers separated by a comma.

RelatedGlossary: integer, mouse pointer, return value, return
Message: linkClicked, mouseDoubleUp, mouseStillDown
Keyword: item
Object: stack
Control Structure: function
Command: popup, click
Function: mouseClick, selectedLoc, clickH, clickV, clickStack
Description

Use the clickLoc function to determine where a user clicked, or to determine whether the mouse pointer has moved since the last click.

The first item of the returned value is the horizontal distance in pixels from the left edge of the clicked stack to the location of the click. (Use the clickStack function to identify which stack was clicked.) The second item of the returned value is the vertical distance from the top edge of the clicked stack to the location of the click.

The click location is the position of the mouse pointer when the user pressed the mouse button, not when the user released the button. In particular, inside a mouseDown handler, the clickLoc returns the position of the mouse as it was when the mouse down action occurred.

The first item of the clickLoc is equal to the clickH. The second item is equal to the clickV.

Tagsui