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:
- Automatic type conversion of text in Applescript,
- buggy screen updating in OmniGraffle.
Some work-arounds are:
- Indirection (use of references rather than simple variable assignments),
- 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