Hopefully someone might be able to point me in the right direction with this query.
As yet I’ve not been able to come up with a solution.
Let’s say the text below is a line of copy in a Quark text box. The words in bold are coloured Magenta.
Here’s the line:- The quick brown fox jumps over the lazy dog
I can create an object reference to the first and last words of the line like this:-
set x to object reference of every line of text box 1 whose color of first word is "Magenta"
set y to object reference of every line of text box 1 whose color of last word is "Magenta"
Those references work fine.
What I’d like to be able to do is create an object reference to a line of text where any word, in it, is coloured Magenta. As shown, I can only get this to work for the first and last words.
Does this work?
Not had much chance to test though .
tell application "QuarkXPress"
tell document 1
set x to object reference of every word of every line of text box 1 whose color is "Magenta"
end tell
end tell
if i understand what your after then it can be done but it ain’t very straight forward.
Doing a search on these forums you need to trap the reference as an error then use applescript delimiters to
extract the reference out of the resulting error message.
i reckon if you really really need this info then you might find yourself going round the houses a bit.