View Single Post
Hi,

Can anyone help with this script, or am I going awry in my assumptions somewhere?

I want to export the frontmost document as an OPML file. I am using OmniOutliner 3.5 (v134.2) - do I need Pro? and Mac OS X 10.4.6 .

When I run the script I get NSInternalScriptError and no file :(

If I remove the as "opml" part I get a new folder called test that contains a document content.xml, which appears to be binary!

Code:
tell application "OmniOutliner"
	set thePath to (choose folder) as string
	set opmlPath to thePath & "test.opml"
	set posixPath to (POSIX path of opmlPath)
	display dialog posixPath
	export front document to posixPath as "opml"
end tell
Any ideas?

Many thanks,
Toby