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 to query the user data key/value pairs Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next

I've been working on a script to write values into the key/value user data dictionary available with shapes in the Pro version of OmniGraffle.

The syntax to do this is:

make new shape with properties {text:"My Shape", url:"http://...", user data:{myKey:"myData"}
Whilst I can get this data into OmniGraffle so that I can see it in the interface I can't get my head around how to construct a way of getting at them.

Here's what I'm trying to do:

set myShapes to shapes of canvas of front window whose myKey is "myData"

I get all sorts of errors about how it can't find/coerce etc. I know it has to be my limited ability to construct the right argument.

I can get the dictionary out with the following script:

tell application "OmniGraffle Professional 5"
	user data of graphic id 3 of canvas id 1 of document "Untitled" of application "OmniGraffle Professional 5"
end tell
Any help would be appreciated.

Regards Alan

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Applescript: user data item of canvas cyleigh OmniGraffle Extras 1 2011-05-04 09:59 PM
Custom text exports from OmniFocus (applescript-based query language) RobTrew OmniFocus Extras 0 2011-01-14 07:08 AM
Leveraging custom/user data fink08 OmniGraffle General 1 2009-11-12 08:08 AM
Finding a graphic using user data property Joe.Hocker AppleScripting Omni Apps 3 2009-03-26 12:03 PM
Sharing OF data across user accounts beelers OmniFocus 1 for Mac 0 2007-11-24 05:51 PM

All times are GMT -8. The time now is 12:18 AM.

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