wp.setSelect

Syntax wp.setSelect (start, end)

Params start is a number indicating the character position within the target window in which the selection should start.

end is a number indicating the character position within the target window in which the selection should end.

Action Selects the text beginning with the character at start, up to and including the character at end.

Returns True

Examples edit (@examples.testText2);
wp.setSelect (0, 0)

   » true

Using wp.setSelect (0, 0) as in the example above, ensures that the cursor is at the beginning of the document and no text is selected.

edit (@examples.testText2);
wp.setSelect (0, 30);
wp.getSelText ()
This example returns the first 30 characters of the target document.

Notes If the target document is an outline or table in text mode, the selection can never encompass more than one headline. Even if you provide arguments for start and end that would extend the selection past the end of the present heading, the selection will

not be extended past that heading.

See Also wp.getSelect

"wp.setLine"

wp.getSelText

wp.selectParagraph

wp.selectWord

Discuss