The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniGraffle General (http://forums.omnigroup.com/forumdisplay.php?f=10)
-   -   Learning to script OmniGraffle (http://forums.omnigroup.com/showthread.php?t=7538)

RobLewis 2008-03-18 11:32 AM

Learning to script OmniGraffle
 
Where does one go to learn how to script OG? Reading the scripting dictionary only takes you so far.

My immediate problem: how to get/set the text in an existing text object.
So far, I haven't been able to figure out how to refer to the text object. In an existing drawing, how do I figure this out?

tell application "OmniGraffle Professional 4"
tell document "My Doc"
tell layer 1 of canvas 1
what goes in here?
end tell
end tell
end tell

Joel 2008-03-18 12:33 PM

You can get a head start on how OmniGraffle objects are handled via AppleScript by creating an object, and then copying it as AppleScript from the Edit Menu --> Copy As submenu.

Hope that helps,

RobLewis 2008-03-19 08:26 PM

OK, I'm making progress, but now I need to know how to make OmniGraffle Pro 4 print. There's only one document open.
tell application "OmniGraffle Professional 4" to print front document without print dialog
just gives an error message: "document 1 doesn't understand the print message"
"print document 1" gives the same message.


All times are GMT -8. The time now is 07:36 PM.

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