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: set multiple shape properties in 1 call? Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Apologies for re-post, I could not edit the title of the earlier post.

I am using Applescript to set the properties of some Omnigraffle shapes. I am using Python/appscript, but would appreciate any pointers in plain Applescript as well (or anything else).

When I get the properties of a shape, Omnigraffle returns a dictionary of all key-value pairs (color, text, stroke, locked, etc.). When I create a new shape I can similarly send in a bunch of properties as a dictionary e.g. (in Python/appscript):

with_properties={k.text: 'foo', k.draws_stroke = True})

Is there a way to update a bunch of properties of an existing shape with a single call, passing in a dict of properties? If so, any restrictions on which properties can be set this way?

e.g. When I tried{k.locked: True}) -- it worked.

But when I tried:{k.text: 'foo'}) -- it did nothing.


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Applescript: which shape properties can be set via a dictionary? Sophie OmniGraffle General 4 2012-11-23 08:17 AM
Best way to add multiple color (swatches) to a shape? Sophie OmniGraffle General 2 2012-11-19 08:41 AM
Set a bunch of shape properties in one call? Sophie OmniGraffle General 0 2012-11-07 09:28 PM
Using AppleScript to set the Script field of a shape MiBo OmniGraffle General 2 2011-07-27 10:21 AM
Protect shape properties mattydj OmniGraffle Extras 1 2009-10-22 03:43 PM

All times are GMT -8. The time now is 01:35 PM.

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