I am wanting to do a text on a generic box in QuarkXPress 4.11 to see if it’s fill colour is “White” and if it is then show a dialog letting me know that yes it is white. Nothing is working and I can’t figure out what to do. Here is what I have been working with.
tell application “QuarkXPress LDS Passport™ 4.11”
tell document 1
set myC to color of current box
if myC is “White” then
display dialog “Yes the fill colour of this box is white.”
end if
end tell
end tell
I did this in QX 5.x but the lesson still applies.
Strip out the If…Then part of your script and show the results window (if in OS9.) See what you’re getting ?
tell application “QuarkXPress 5.01”
tell document 1
set myC to color of current box
end tell
end tell
→ color spec “White” of document “Document1” of application “QuarkXPress 5.01”
This is what myC contains, not just the color NAME (emphasis added!) The “set myC…” should be…
set myC to NAME of color of current box
Here’s where the dictionary comes in handy.
Good Luck.