View Single Post
Being able to save an individual canvas as you first tried is really something we ought to add...

For now, you'll have to iterate over the canvases via:

Code:
tell application "Finder"
	set saveFolder to desktop as string
end tell
tell application "OmniGraffle Professional"
	set theDocument to front document
	set canvasCount to count of canvases of theDocument
	repeat with canvasNumber from 1 to canvasCount
		set canvas of front window to canvas canvasNumber of theDocument
		save theDocument as "png" in (saveFolder & "ssh" & canvasNumber & ".png")
	end repeat
end tell
1. You have to ask for desktop from the Finder, otherwise you'll just get back the string "desktop" instead of the actual path.
2. The way you switch canvases is by setting the active canvas on the window.
3. You need to have the - as "png" - part on the save command, or else it'll think you want to save in the standard graffle format and any "."s are just part of the name.

And the reason why you always see at least one document is because the current stencil is also available as a document for scripting.