Error using applescript to create oo file

Edit: solved my problem. Omni had to make some changes with applescript due to sandboxing.

Hi! I’m new here; apologies if this is the wrong place. Was just wondering if someone could offer some advice on saving new oo files with applescript. I have a script that worked with a previous oo 4 and osx install that will not work anymore, and I’m at a loss to figure out why.

I’m using applescript to make an oo file with this snippet and failing with “The document x could not be saved. You do not have permission.”

However, the directory is 777 and I definitely do have permission. I can create it manually after my script closes. Weird thing is, if I delete the file I manually created then run the script again, it works as expected, but not if I do anything that would change the filename.

Would love to hear any tips. Here’s the offending section of my script:

	tell application "OmniOutliner"
		open pathToDefaultTemplate
		set newOutline to front document
		set thepath to pathToOutlines
		set title of column 2 of newOutline to conditionName
		save newOutline in (thepath & conditionName)
	end tell


save newOutline in (POSIX file (thepath & conditionName & “.oo3”))