seGetSelectedTextPos()

Returns the selected text coordinates in the script editor.

Synopsis

int seGetSelectedTextPos(int &startLine, int &startColumn, int &endColumn, int &endColumn);

Parameters

Parameter Description
startLine Start line of the selection, starting at 0.
startColumn Start column of the selection, starting at 0.
endLine End line of the selection, starting at 0.
endColumn End column of selection, starting at 0.

Return value

Returns the current selection in the given variables.

Returns -1 if an error occurs and 0 in case of success.

Description

This function returns the positions start line, start column, end line and end column for the selected text in the script editor.

Example

In the following example shows the position of the currently selected text in the debug.

main()
{
  int startLine, startCol, endLine, endCol;
  int error = seGetSelectedTextPos(startLine, startCol, endLine, endCol);
  if ( !error )
    DebugTN("My selected text starts at line - " + startLine + " and ends at line - " + endLine);
}

Assignment

Script Editor Extensions

Availability

UI