View Single Post
This kind of code seems, as I think you have probably already discovered, to trip an exception:

Code:
tell application id "OGfl"
	tell canvas of front window
		set refSubGraphics to a reference to graphics of first item of subgraphs
		
		set oShape to make new shape at end of refSubGraphics with properties {size:{90, 90}}
	end tell
end tell
27/11/2012 10:13:29.247 OmniGraffle Professional: An exception was thrown during execution of an NSScriptCommand...
27/11/2012 10:13:29.247 OmniGraffle Professional: *** NSMapInsert(): attempt to insert notAKeyMarker

(Might be worth asking Help > Send Feedback whether that is by design)

but this seems to work:

Code:
tell application id "OGfl"
	tell canvas of front window
		set refSubGraphics to a reference to graphics of first item of subgraphs
		set oShape to make new shape with properties {size:{90, 90}}
		move (oShape) to end of refSubGraphics
	end tell
end tell
--

Last edited by RobTrew; 2012-11-27 at 02:36 AM..