mouseText

# Metadata

Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:

# Syntax

the mouseText

# Examples

the mouseText

if the style of the mouseText is "group" then showDef the mouseText

# Description

Use the mouseText function within a handler to determine which word or grouped text the mouse pointer is hovering over, in order to take some action based on the click.

The mouseText function only returns words in a field. If the mouse pointer is not over a field, the mouseText function returns empty.

The return value contains the word the mouse pointer is over. If the textStyle of the text is "link", the return value contains the entire grouped text.

To get the location of the word or text group clicked, use the mouseChunk function.

>*Important:* Words are defined a little differently by the mouseText > function than the way they are used in > chunk expressions. A word, for purposes of the > mouseText, is any text delimited by spaces, tabs, returns, or > punctuation. If the mouse pointer is over a punctuation character, > only that character is returned.

# Tags

ui,

# See

- **keyword:** character, words, word, field - **function:** clickText, mouseCharChunk - **glossary:** handler, grouped text, mouse pointer, return, chunk expression, return value - **control structure:** function