View Single Post
I have some scripts that automate the export of multi-canvas files, but the scripts seem to fail on the "open" call. Specifically, they hang. I can replicate the problem with a simple script I found on the forums here:

Code:
set myDocument to (choose file with prompt "Select an Omnigraffle file")
tell application "OmniGraffle Professional 5"
	set oDoc to open alias myDocument
	set numCanvas to count of canvases of oDoc
end tell
The event/reply log for running this script is:

Code:
tell application "AppleScript Editor"
	choose file with prompt "Select an Omnigraffle file"
		--> alias "Macintosh HD:Users:einarnn:Droplets:cca-visualization.graffle"
end tell
tell application "OmniGraffle Professional 5"
	open alias (alias "Macintosh HD:Users:einarnn:Droplets:cca-visualization.graffle")
Result:
error "OmniGraffle Professional 5 got an error: AppleEvent timed out." number -1712
Any hints as to how to resolve this problem is will be gratefully received!!

Cheers,

Einar