foundLoc

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the foundLoc
foundLoc()
Summary

Returns the location of the top left corner of the box that surrounds text found by the find command.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
the foundLoc
drag from the foundLoc to the bottomLeft of this card
Values
NameTypeDescription
return

The foundLoc function returns two positive integers separated by a comma.

RelatedProperty: pixels
Control Structure: function
Keyword: item, selection
Object: stack
Glossary: current card, integer, command, return, return value, stack window
Command: find
Function: selectedLoc, foundField
Description

Use the foundLoc function to determine the location in the stackwindow where the found text is shown.

When the find command finds text, it surrounds the text with a box. The first item of the return value is the horizontal distance in pixels from the left edge of the stack to the left edge of this box. The second item of the returned value is the vertical distance from the top edge of the stack window to the top of the box.

The foundLoc function is cleared when the text selection moves into the foundField or when the current card is closed. At the same time, the box the find command draws around the found text disappears. If there is no box, the foundLoc function returns empty.

Tagsdatabase