seSetLines()

Inserts multiple lines of text in the selected lines in the script editor. The text already in the lines will be replaced.

Synopsis

int seSetLines( dyn_int lines, dyn_string texts);

Parameters

Parameter Description
lines An array of line numbers
text An array of texts, which shall be inserted.

Return value

0, for success.

If an error occurs, -1 will be returned.

Description

The function inserts multiple lines of text into the specified lines in the script editor. This function works as seSetLine() does, the only difference being the use of arrays to address multiple lines. For more information, see seSetLine().

The text array and the line array have to be the same size. If the sizes are different, an exception with the difference will be shown and the function will return the error.

This function is an expansion to the script editor and cannot be used in another context. To retrieve the script from the Editor, use the existing function getScript() and to set it back, use the existing function setScript(). The extension scripts have to be located in the <proj_dir>/scripts/scriptEditor directory and have the extension "_ext.ctl". The Scripts can only be loaded and executed from this directory.

The entered line number doesn't correspond with the number in the script editor. This function starts to search for the specified line number at the position 0, which is shown as line 1 in the script editor. To enforce the consistency of both line numbers, the parameter line has to be decremented by one.

Example

This example sets two texts in the lines 0 and 1.

void SetLines()
{
dyn_int lines = makeDynInt(0, 1);
dyn_string texts = makeDynString(“Line 0 text”, “Line 1 text”);
seSetLines(lines , texts );
DebugN(“Lines:” + lines, “have texts:” + texts);
}

Assignment

Script Editor Extensions

Availability

UI