Home
The HyperCard Center
HyperTalk Reference
Home » HyperTalk Reference » selectedText

Note: This is a work in progress and many formatting issues have been fixed. Read more about the project on the home page.

selectedText

the selectedText
the selectedText of listField
the selectedText of popupButton

Value returned: a string equal to the range of characters currently selected. If nothing is highlighted, it returns empty.

If a field isn't currently a list field but it was in the past, and a selection had been made when it was a list field, the selectedText returns the most recent selection.

Demo Script

on whatIsTheSelection
select line 2 of me
answer "The selectText is “" & the selectedText & "”"
end whatIsTheSelection

Related Topics

Placeholders

HyperTalk Reference

Version 0.8b4 (July 4, 2025)

Made with Macintosh

Switch to Retro View