The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniOutliner > OmniOutliner 3 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
duplicate the above row-- applescript? Thread Tools Search this Thread Display Modes
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?
 
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.

Code:
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
 
Thank you so much! This is exactly what I needed.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
applescript to delete duplicate tasks jamesafoster OmniFocus Extras 1 2013-04-02 07:55 AM
reference of result of duplicate command in applescript? ericscheid OmniGraffle General 1 2012-09-05 10:25 PM
Duplicate Action (applescript request) steve OmniFocus Extras 7 2012-01-13 08:12 AM
Applescript Duplicate command: how to use it? Lutin OmniFocus Extras 6 2007-10-30 12:56 AM
Does duplicate work yet ?? ext555 OmniFocus 1 for Mac 3 2007-09-08 05:58 AM


All times are GMT -8. The time now is 08:49 AM.


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