Input.GetSelection

table Input.GetSelection (

string ObjectName )

Description

Returns the start and end positions of text that is selected in an input object.

Parameters

ObjectName

(string) The name of the input object.

Returns

(table) A table containing three numeric indexes. The first index stores where the selection started, the second stores where the selection ended in the input object, and the third stores the line number of the first character of the selection. You can access these values using the table keys "Start", "End", and "LineNum." If the "Start" and "End" values are the same, this means there was no selection, so they will contain the cursor position. 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