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 Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Help with scripting Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
I am using MacRuby to script Omnigraffle Pro (infinitely easier and nicer than Applescript). I can easily get a handle on the app, document, canvas, etc. Now want to add / manipulate shapes on the canvas.

framework 'ScriptingBridge'

$omni = SBApplication.applicationWithBundleIdentifier("com .omnigroup.OmniGrafflePro")

$document = $omni.windows[0].document

$canvas = $omni.windows[0].canvas

$canvas.methods(true,true).sort

=> [:adjustsPages, :"assembleSubgraph:tableShape:", .... :verticalPages]

The AppleScript dictionary report:
make v : Make a new object.
make
new type : The class of the new object.
[at location specifier] : The location at which to insert the object.
[with data any] : The initial data for the object.
[with properties record] : The initial values for properties of the object.
→ specifier

And Omnigraffle "Copy as Applescript" suggests this:
tell application "OmniGraffle Professional"
tell canvas of front window
make new shape at end of graphics
with properties {size: {10,80}, origin: {9,9}}
end tell
end tell

I cannot find the "make new <type> ..." method on Canvas.

Questions:
- Where is this method?
- What other resources (e.g. Objective-C header files? Anything else?) can I use to find out about valid parameter values (e.g. is it a numeric code for "Shape"? "Rectangle"? How do I say "at <end of graphics>"?

Thanks!!
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help about OO3 scripting agostinocirillo OmniOutliner 3 for Mac 1 2012-11-14 06:58 AM
Scripting HenryS OmniWeb General 0 2012-08-01 10:53 PM
Scripting OG jem OmniGraffle General 0 2011-01-16 06:28 AM
Scripting Help Please! Skanger OmniFocus Extras 3 2008-10-30 10:42 AM
OO scripting failures hardcoreUFO OmniOutliner 3 for Mac 2 2008-03-24 11:23 PM


All times are GMT -8. The time now is 09:29 PM.


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