Scripting a search in OO3

Michael Terry formido at mac.com
Fri Jan 7 10:03:28 PST 2005


 
On Thursday, January 06, 2005, at 03:01PM, Fraser Speirs <fraser at speirs.org> wrote:

>Hi,
>
>I'm just wondering if it's possible to AppleScript a search in OO3?  
>What I'd like to do is create a toolbar script which does a search for 
>every instance of the text of the selected row.
>

You can't activate the find panel, but you can do something like this:

tell application "OmniOutliner Professional" to tell front document
	set searchTxt to topic of first item of selected rows
	set results to every row where its topic contains searchTxt
end tell
 
Depending on what features you want, the script can be made more sophisticated, for example highlighting all found rows with a particular style. You'd want a partner script to clear the highlights too. In Outliner 2, it would have been possible to select the found rows, but not anymore.

Michael



More information about the OmniOutliner-Users mailing list