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 > Developer > AppleScripting Omni Apps
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Export file OO4 Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Hey, applescript newbie here. I'm trying to write a script that will export my OO4 file to a specified format and location. In the Omnioutliner applescript dictionary I found:

Quote:
export v : Exports the document to the specified location and file type. Unlike the "save" command, this will never set the name of the document or change its modified flag.
export specifier : the object for the command
to file : Where to place the exported document.
[as text] : The name of a writable file type to use when writing the document. Defaults to the appropriate type for the path extension on the export destination.
And based on that I made a few attempts:

Code:
tell application "OmniOutliner"
	export to "/Users/mm/Dropbox/My Stuff/Outliner export" as ".rtf"
end tell
Did nothing.

Code:
tell application "OmniOutliner"
	tell front document
		export to "/Users/mmarotta/Dropbox/My Stuff/Outliner export/Sell house (conflict from Macbook-Pro-Michael-Marotta).oo3"
	end tell
end tell
Gave error message "error "OmniOutliner got an error: “Sell house (conflict from Macbook-Pro-Michael-Marotta).oo3” couldn’t be moved because you don’t have permission to access “Outliner export”." number 7"

Code:
tell application "OmniOutliner"
	set mydoc to open "/Users/mmarotta/Documents/My Local Stuff/OmniPresence/Outliner Notes Files/Outline Projects/Sell house.oo3"
	export mydoc to "/Users/mmarotta/Dropbox/My Stuff/Outliner export/Sell house.oo3" as ".rtf"
end tell
Said .rtf is not a writable format. I tried ".rtf", "RTF", "RTF (Rich Text Document)", "HTML", and "com.omnigroup.OmniOutliner.HTMLExport/HTML (Dynamic)" (which I saw used in another post) and all got the similar error. I'm not really sure what's supposed to go in here.

When I tried removing the 'as .rtf' section hoping it would just default to something to see if the rest of the script worked I got "error "OmniOutliner got an error: “Sell house.oo3” couldn’t be moved because you don’t have permission to access “Outliner export”." number 7"

I just can't get any of this to work. Like I said, I'm super new to applescript so it's probably something obvious but I'm not really sure where to go from here.

Thanks!

Last edited by random1destiny; 2014-03-11 at 08:06 AM..
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes



All times are GMT -8. The time now is 01:19 PM.


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