Hi All,
I'm trying to extend the 'autoexport' applescript, and wish to handle multiple-page/canvas drawings by saving each canvas as a separate image. I don't want to use the 'entire document' export area option as a) it exports full-page rt. just the objects, and b) it creates separate files in a new subdirectory (I wish to export file.graffle -> file.1.png, file.2.png, etc).
Sooo, I've tried:
but that doesn't work:
I guess you can only "save" (export) a document - so I guess I have to iterate over each canvas and save? How do I change the active canvas?
BTW, how come there's always one document returned by 'documents'? The following is with OG open, but no open docs:
-> {document "Basic.graffle" of application "OmniGraffle Professional"}
Thanks in advance,
Ben
I'm trying to extend the 'autoexport' applescript, and wish to handle multiple-page/canvas drawings by saving each canvas as a separate image. I don't want to use the 'entire document' export area option as a) it exports full-page rt. just the objects, and b) it creates separate files in a new subdirectory (I wish to export file.graffle -> file.1.png, file.2.png, etc).
Sooo, I've tried:
Code:
tell application "OmniGraffle Professional" save canvas 1 of first item of documents in file ((desktop folder as string) & "ssh.png") end tell
Code:
OmniGraffle Professional got an error: NSReceiversCantHandleCommandScriptError
BTW, how come there's always one document returned by 'documents'? The following is with OG open, but no open docs:
Code:
tell application "OmniGraffle Professional" documents end tell
Thanks in advance,
Ben