View Single Post
Quote:
Originally Posted by RobTrew View Post

Code:
tell application id "OGfl"
	tell canvas of front window
		make new shape at end of graphics with properties {corner radius:5, fill:linear fill, draws stroke:false, autosizing:clip, size:{90.0, 90.0}, text:{{text:"This text is ", alignment:center}, {text:"partially", alignment:center, font:"Helvetica-Bold"}, {text:" bolded", alignment:center}}, origin:{358.0, 223.000002}, gradient color:{0.666667, 0.177494, 0.193412}, magnets:{{0, 1}, {0, -1}}, vertical padding:0, fill color:{1.0, 0.610458, 0.121713}}
	end tell
end tell
There used to be a bug in scripted changes to text properties which required a forced refresh (by nudging zoom level) before you could see the results, but my impression was that that has now been addressed.

--
If you change your make new shape to use an existing shape, and try to set it's properties with a dictionary, you will find a ton of properties will not work (not visually, nor even changing the underlying data, I think). From the properties I have tried so far, I have had trouble with all of the following:
name, text, stroke_cap, autosizing, fill, fill_color, blend_color, gradient_color, gradient_angle, blend_fraction, side_padding, vertical_padding, textRotation, head_type, tail_type, head_scale, tail_scale, line_type
On the whole it does not look like setting multiple properties of an existing shape via a dictionary is supported. Could someone from Omni confirm / shed some light?

Thanks!