The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniGraffle > OmniGraffle General
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Applescript: saving canvases Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
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:
Code:
tell application "OmniGraffle Professional"
	save canvas 1 of first item of documents in file ((desktop folder as string) & "ssh.png")
end tell
but that doesn't work:
Code:
OmniGraffle Professional got an error: NSReceiversCantHandleCommandScriptError
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:

Code:
tell application "OmniGraffle Professional"
	documents
end tell
-> {document "Basic.graffle" of application "OmniGraffle Professional"}

Thanks in advance,
Ben
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get a list of selected canvases using applescript fikovnik OmniGraffle General 0 2013-01-09 08:25 AM
Canvases keep re-sizing themselves PRV OmniGraffle General 6 2012-07-25 05:38 PM
multiple master canvases, new canvases wynntemp OmniGraffle General 2 2009-02-23 02:44 PM
Turn layers on/off across all canvases fjordaan OmniGraffle General 3 2008-07-31 12:50 PM
How to set guides across multiple canvases sugarfreejones@gmail.com OmniGraffle General 0 2008-07-30 02:44 PM


All times are GMT -8. The time now is 10:51 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2022, vBulletin Solutions, Inc.