Synopsis
result = EditGetText(varname, start, end, options)
Args
start is the line number and character number upon that line where the text starts. Each is separated by a space. For example, '1 1' sets the text to start at the first character on the first line (ie, the start of the script).
end is the line number and character number upon that line where the text ends. Each is separated by a space. For example, '2 4' sets the selection to end at the fourth character on the second line.
If character number is -1, the cursor is set to the end of the line.
If start and end are omitted, then whatever text is currently selected is returned.
varname is the name of a stem variable where each line of text is returned. The first line is in varname.1 and a count of how many lines is put in varname.0.
option is any of the following:
'CLIP' | Copy the text to the clipboard. varname can be omitted. |
If omitted, none of the above.
Returns
An empty string if success, or an error number/string if a failure.
Notes
To fetch the entire contents of a window, set the start to '1 1' and the end to '-1 -1'.
This does not affect the selection nor cursor position.