"Merge Rows" applescript
Brian C.
dvorak at omnigroup.com
Thu Oct 20 14:07:37 PDT 2005
Whoops - you're absolutely correct. I really wish ScriptEditor left
those alone when I entered them, rather than converting them into
non-copyable 'real' characters which I then slap back into place
incorrectly before sending out. Sorry, all - corrected version below.
tell front document of application "OmniOutliner Professional"
set theText to ""
set theCount to (count of selected rows)
if theCount < 2 then
display dialog "You need to select at least two rows to use
this script." buttons "Cancel" default button "Cancel"
end if
set theFirstSelected to first item of selected rows
repeat with i from 1 to (theCount - 1)
set theText to theText & (topic of (item i of selected rows)) &
"\n"
end repeat
-- now stick the text of the last row on by hand
-- without the trailing newline
set theText to theText & (topic of last item of selected rows)
make new row with properties {topic:theText} at before
theFirstSelected
repeat with aRow in selected rows
delete row id (id of aRow)
end repeat
end tell
On Oct 19, 2005, at 6:34 PM, alex bueno wrote:
> Thanks for the script!
>
> But it seems this:
> set theText to theText & (topic of (item i of selected rows)) & "/n"
> should be this:
> set theText to theText & (topic of (item i of selected rows)) & "\n"
>
> afb
More information about the OmniOutliner-Users
mailing list