The Omni Group Forums

The Omni Group Forums (
-   OmniOutliner 3 for Mac (
-   -   duplicate the above row-- applescript? (

steve 2006-04-28 11:45 AM

duplicate the above row-- applescript?
Is there a way to duplicate the above row in OO?

I could of course, highlight the line, copy it, hit return, and then paste it. I think in FileMaker Pro cmmnd+ " would duplicate the above line.

Any possible directions? An applescript? A keyboard command I am missing?

Tim Wood 2006-05-01 03:17 PM

This will duplicate the selected rows and put them before the first selected row. It leaves the original selection alone -- wasn't clear if that's what you wanted or whether you wanted the new duplicates to be selected.

Also, this has no error checking of its own, so if you have no document open or no rows selected it'll yield an error or silently do nothing.

tell application "OmniOutliner Professional"
set MyDoc to front document
set FirstRowID to id of first selected row of MyDoc
set FirstRow to a reference to row id FirstRowID of MyDoc
set MyRowIDs to id of every selected row of MyDoc
repeat with MyRowIndex from 1 to count of MyRowIDs -- force forward loop
set MyRowID to item MyRowIndex of MyRowIDs
duplicate row id MyRowID of MyDoc to before FirstRow
end repeat
end tell

steve 2006-05-02 08:18 AM

Thank you so much! This is exactly what I needed.

All times are GMT -8. The time now is 02:04 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2022, vBulletin Solutions, Inc.