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

 
Can I copy rows without their children? Thread Tools Search this Thread Display Modes
I often find myself in a situation where I want to copy a row without getting all the children on the clipboard as well. (Now, for instance, I am preparing a Keynote presentation, and need one slide to be an overview of the main points.) The only way I have found to do this is to mark the text of each row and copy that. That is a bit cumbersome, and means I can't copy multiple rows at one. Is there a smarter way?
 
The following script will copy only the selected rows (no children, no notes, only the topic column) to the clipboard. The rows do not have to be at the same level in the outline.

Code:
tell application "OmniOutliner Professional"
	tell front document
		set theRows to get selected rows
	end tell
	set rowCount to (count of theRows)
	if (rowCount is 0) then
		display dialog "You must select one or more rows!" buttons "OK"
		return
	end if

	set rowIndex to 1
	set clipboardText to ""
	repeat rowCount times
		set theRow to item rowIndex of theRows
		set clipboardText to clipboardText & topic of theRow & "
"
		set rowIndex to rowIndex + 1
	end repeat
	set the clipboard to clipboardText
end tell
 
Thanks a bunch!

I'm kind of an AppleScript noob, though, and couldn't find anything in the manual or here in the forum on how to use an Applescript in OO3. Can you give me a hint?
 
Using Applescript with OO is easy, at least if you don't have to figure out how to write Applescript :-)

There's an excellent description of how to set it up over in one of the OmniFocus forums, in http://forums.omnigroup.com/showthread.php?t=7453

Read Rob's directions very carefully as some things that seem like they don't matter, do! If you get stuck, just post again...
 
Of course, having said that and rereading the posts in the referenced thread, I see that no one spoke to how to take a script posted as text (such as mine) and get it working. Once you've gotten the script folder created for OmniOutliner, fire up the Script Editor (called Applescript Editor in Snow Leopard) found in the Applications/Applescript folder. You can copy and paste the text of the script in to a new window, and then save as a .scpt file in the script directory for the application.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Script: Copy selected rows as tab-indented (Markdown) plain text outlines RobTrew OmniOutliner 3 for Mac 2 2012-11-29 02:19 AM
copy & paste to different rows possible JaTo OmniOutliner 3 for Mac 6 2012-07-12 10:46 AM
Copy rows from one outline to another outline kknorpp001 OmniOutliner for iPad 2 2011-09-19 09:30 AM
Script to copy columns (and any selected rows) to new doc RobTrew OmniOutliner 3 for Mac 0 2010-06-07 02:47 AM
Feature requests - merge rows and icons for rows maish OmniOutliner 3 for Mac 0 2008-09-19 07:12 AM


All times are GMT -8. The time now is 02:20 AM.


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