Thread: Merge items
View Single Post
The built-in keystrokes work well for merging a couple of selected rows, and have the advantage of preserving character formats.

For merging more than two selected rows (in circumstances when preserving emphases and other character formats is not necessary) I use an applescript of the following form:

Code:
property pDelimiter : return
-- OR property pDelimiter : space

set strDelim to text item delimiters
set text item delimiters to pDelimiter

tell application id "com.omnigroup.OmniOutlinerPro3"
	tell front document
		set refRows to a reference to every selected row
		set slnRows to contents of refRows
		
		if length of slnRows < 2 then return
		
		set {lstID, lstText} to {id, topic} of refRows
		make new row with properties {topic:lstText as text} at before first item of slnRows
		
		repeat with strID in lstID
			delete row id strID
		end repeat
	end tell
end tell

set text item delimiters to strDelim

Last edited by RobTrew; 2010-04-21 at 04:23 AM.. Reason: Pointing out that the applescript route discards character formatting