"Merge Rows" applescript
alex bueno
beingnonbeing at bellsouth.net
Wed Oct 19 18:34:06 PDT 2005
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
On 19 Oct 2005, at 8:17 pm, Brian C. wrote:
> A customer asked for the ability combine several items from the
> same level into one multi-lined entry.
>
> The following AppleScript doesn't do *exactly* what the customer
> was asking for - it doesn't enforce the "from the same level"
> restriction, for example - but it's close. Figured it might be
> useful to some of you out there in the real world, as well.
>
> (The script will work in OO standard if you just trim the
> application name in the first line before saving it in script editor.)
>
> bwc
>
>
> 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
>
> _______________________________________________
> OmniOutliner-Users mailing list
> OmniOutliner-Users at omnigroup.com
> http://www.omnigroup.com/mailman/listinfo/omnioutliner-users
>
More information about the OmniOutliner-Users
mailing list