View Single Post
I've written an applescript to automate taking an OmniOutliner Pro document, save it, dump it to OPML, and then run the OPML through an XSLT filter. Here is the part that works with OmniOutliner:

Code:
tell application "OmniOutliner Professional"
	activate
	set theDoc to the document of window 1 of application "OmniOutliner Professional"
	set whoami to the path of theDoc
	save theDoc -- in whoami
	
	set whoami to my swapExtension(whoami, "opml")
	
	export theDoc to whoami as "OOOPMLDocumentType"
end tell

... script continues with calls to handlers, none of which save the original file ...
After I run the script a few times, going to File > Save causes a sheet to slip down, saying 'The location of the document "yadayada.oo3" cannot be determined'.

This happens even though command-clicking on the file icon in the title bar shows the proper location.

Is there something I'm doing wrong in the script (other than being klutzy or ignorant)?