All Notes to Children?

Curtis Clifton curt.clifton at mac.com
Thu Feb 17 18:20:58 PST 2005


Brian,

On Feb 17, 2005, at 5:29 PM, Brian Vito wrote:

> I have an outline in which I've used a lot of notes, but now I'd like 
> those notes to be children.  ... An illustration:
>
> 1. Hello
>     This is a note.
>
> to:
>
> 1. Hello
>   a. This is a note (although it isn't actually a note anymore)
>

Here's a partial solution.  Perhaps another scripter on the list can 
see how to finish it:

tell front document of application "OmniOutliner Professional"
	set theNotedRows to (selected rows whose note is not "")
	repeat with theRow in theNotedRows
		tell theRow
			set theNote to text of note
			set note to ""
			make new row with properties {topic:theNote}
		end tell
	end repeat
end tell

This script takes every row of the current selection (do an expand all, 
select all for processing every row) and converts every note to a child 
item.  The problem is the new "note children" are placed _after_ any 
existing children instead of before.  That is:

1. An Item
     An item's note
     a. A child item

becomes:

1. An Item
     a. A child item
     b. An item's note

Does anyone know the right incantation to make a new row before the 
existing children?  Every combination I've tried seems to lead to an 
NSEvaluationError from OO3 (which is probably a bug, but I don't know 
for sure).

Cheers,

Curt

----------------------------------
Curtis Clifton, PhD Candidate
Dept. of Computer Science, Iowa State University
http://www.cs.iastate.edu/~cclifton




More information about the OmniOutliner-Users mailing list