The Omni Group Forums

The Omni Group Forums (
-   OmniGraffle Extras (
-   -   Understanding Applescript Dictionary (

tomrowan 2007-01-25 02:49 AM

Understanding Applescript Dictionary

This is a bit of a newbie question, but I hope you will forgive me.
I'm trying to draw a line in Omnigraffle using Applescript.
I've done this fine, but I can't work out how to set the "head type" to be an arrow.

I've reviewed the dictionary to find out that the property is "head type", but I can't find out what values I'm allowed to set it to! By trial and error, I've produced the following:

make new line with properties {head type:point, head scale:1.0, stroke cap:butt, corner radius:0, thickness:2, line type:straight, weight:3, stroke color:colour, point list:{{startX, startY}, {endX, endY}}}

I'd like to know a) what values I can set "head type" to and b) where you found out!

Thanks in advance,


tomrowan 2007-01-25 04:38 AM

I have solved part a "FilledArrow" but as I looked this up in someones script, I don't know where to find the answer to part b yet!

Lizard 2007-01-25 04:29 PM

The easiest way I've found is to draw the type of object I want directly in Graffle and then copy as AppleScript and paste into TextEdit, Script Editor, or wherever.
To do this, select your object(s). Then choose "Copy As" from the Edit menu and "AppleScript" from the sub-menu that pops out.
Obviously, this is more a trial-error approach than an exhaustive list, but if you know what you want, it's not _too_ bad.

All times are GMT -8. The time now is 02:19 PM.

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