View Single Post
Quote:
Originally Posted by jgerman
I have a more general question along the same lines as this thread:

Is there a repository of information somewhere that describes how to control OmniGraffle from Applescript? I have several projects that fitting OmniGraffle into the tool chain would be perfect for and I'm willing to learn Applescript to do it, but I can't seem to find documentation of the interface to OG. Perhaps I'm looking in the wrong places?
Well, there are a few ways to do this - the easiest is cribbing from other people's scripts, or recording your own actions with script editor (in /Applications/AppleScript/)

You can discover the controls yourself by looking at the OmniGraffle (or any other application's) dictionary.

Best way to do that is to open up XCode (with the developer tools) and click File->Open Dictionary... A list your applications folder comes up, and omnigraffle should be there. Open it, and it shows you all the commands that OmniGraffle knows about. You can do the same in script editor too, but it's a PPC binary, and I'm trying to stay away from those. Plus Script Editor doesn't produce universal binary output, but AppleScript Studio (in XCode) does, and yup - they tend to be faster!

Then alls you have to do is figure out applescript, but there's much in XCode's documentation and on apple's developer web site to help out there.