244
-- word in all text frames
set searchString to text returned of ¬
(display dialog "Word to set color of?" default answer "the")
tell application "Illustrator CS"
set textArtItemCount to (count text frames in document 1)
if (textArtItemCount > 0) then
repeat with itemCounter from 1 to textArtItemCount
if (((contents of text frame itemCounter of document 1) as string) ¬
contains searchString) then
set fill color of (words of text frame itemCounter of document 1 ¬
whose contents = searchString) to {red:100, green:0, blue:0}
end if
end repeat
end if
end tell
12 Aug 03
AppleScript Reference