View Single Post
It has always been possible to create styled text, but a couple of problems with changing the color etc of a part of a text are:
  1. Automatic type conversion of text in Applescript,
  2. buggy screen updating in OmniGraffle.

Some work-arounds are:
  1. Indirection (use of references rather than simple variable assignments),
  2. micro zoom adjustments of the OG screen.

You can change the color of the Nth word by applying that change to a reference (bypassing automatic conversion of the text to a string variable), but you won't see the result on the OG screen until you force a rewrite by making a small change to the zoom level:

Code:
tell application id "OGfl"
	tell front window
		tell its canvas
			set oShape to item 1 of shapes
			
			set refText to a reference to text of oShape
			set color of word 3 of refText to {0, 0, 65535}
		end tell
		
		set zoom to zoom * 0.99
	end tell
end tell