GetMultiText Function (TextField)

Class

TextField.

Action

Returns the specified lines of text in the multi-line text box.

Syntax

lsText = textfield.GetMultiText([iStartLine, iNumLines])
Variable Description
lsText The text in the specified portion of the text field. LIST OF STRING.
iStartLine Optional: The number of the first line to return. INTEGER.
iNumLines Optional: The number of lines to return. INTEGER.

Notes

If no optional arguments are specified, GetMultiText returns all of the lines of text in the text box as a list of strings. If you include iStartLine and not iNumLines, GetMultiText returns lines starting with the iStartLine line and ending with the last line of the text box. If you include both iStartLine and iNumLines, it returns iNumLines lines starting with the iStartLine line.

GetMultiText does not remove any blank lines within the selected text. If no text is selected, the function returns an empty list. You can set the OPT_GET_MULTITEXT_KEEP_EMPTY_LINES agent option to FALSE to remove empty lines within the selected text.

Example

LIST OF STRING lsSomeStrings
lsSomeStrings = TextEditor.Document.GetMultiText(2, 1)