RichText.GetSelection

table RichText.GetSelection (

string ObjectName )

Description

Returns a table containing the start and end positions of the current selection in a richtext object.

Parameters

ObjectName

(string) The name of the richtext object.

Returns

(table) A table containing two numeric indexes. The first index stores where the selection started, the second stores where the selection ended in the richtext object. You can access these values using the table keys "Start" and "End". If there was no selection, or if an error occurs, a value of nil will be returned. You can use Application.GetLastError to determine whether this action failed, and why.

ResultVariable

When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.

See also: Related Actions