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

 
How does Applescript recognize grouped images in Omnigraffle? Thread Tools Search this Thread Display Modes
I want to write a script selecting each group in each layer of each canvas of a given Omnigraffle file, but I'm not sure how Applescript recognizes grouped images or how the groups are ordered/indexed in the file. Any suggestions on how to do this would be greatly appreciated.
 
Did you figure this out? You can do this:

Code:
tell application "OmniGraffle Professional 5"
	every group of every layer of every canvas of every document
end tell
But in practice you'll want to select certain documents. Run "every document" by itself, and you'll get a bunch of behind-the-scenes documents that Omnigraffle uses.

As far as order is concerned, a group contains a link to its canvas, so you could query its container hierarchy like so:

"canvas of every group of every layer of every canvas of every document"

More generally, I'd guess that item order (ie first, second, third) in Applescript lists correspond to Omnigraffle front-to-back order, and not the sequence in which they were created. This appears to be the case with layers (where layer titled "Layer 1" could actually be "item 2 of layers" in Applescript), but I haven't examined it thoroughly.

HTH, Charles
 
Sorry for the late response. Thanks very much, Charles!
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Message for images inside omnigraffle? talber6 OmniGraffle General 0 2010-08-29 05:02 PM
AppleScript-Omnigraffle Documentation? Daria OmniGraffle General 2 2009-07-22 11:18 AM
Apple-Script triggered exports of selection into separate images in OmniGraffle 5 Pro Scifer_2008 OmniGraffle General 0 2008-09-03 06:01 AM
Can I name an OmniGraffle window in AppleScript? ianpiper OmniGraffle General 0 2008-07-30 06:36 AM
Expanding images with applescript seanmc8000 OmniOutliner 3 for Mac 2 2007-07-12 12:41 AM


All times are GMT -8. The time now is 08:37 AM.


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