op.findNext

Syntax op.findNext (searchString, wholeWords = false)

Params searchString is text to find in an outline.

wholeWorlds is an optional boolean. If true, find whole words only.

Action Finds the next occurrence of searchString in an outline.

Returns True if the text is found, false otherwise. Also returns false if the target window is not an outline window.

Examples target.set (@examples.list1);op.firstSummit ();op.findNext ("k") //the first k is found

   » true

target.set (@examples.list1);op.firstSummit ();op.findNext ("k");op.findNext ("k") //the second k is found

   » true

target.set (@examples.list1);op.firstSummit ();op.findNext ("k");op.findNext ("k");op.findNext ("k") //there is no third k

   » false

Notes The case-sensitivity of the find operation is set in search.params.

When the sought-for text is located, the bar cursor is placed on the line in which the text was found.

If the selection is the only occurrence of string, op.findNext returns false and leaves the selection unchanged.

See Also op.find

Discuss