Changing Quark Traps

Hi, I have a number of Quark docs which were setup for 5 color printing which need to be reprinted as 4-color, which means some elements need different traps. I have written the following in an effort to change the way a yellow box with a black frame traps:

tell application "QuarkXPress™ 4.11"
   activate
   tell document 1
      repeat with x in (object reference of every text box whose {color:"TEXT YELLOW"} as list)
         set frame of text box x to {inside trap:default, outside trap:default}
      end repeat
   end tell 
end tell

The script runs with no error but the trap of the frame doesn’t change from its custom setting to the desired default. Any suggestions? Thanks Rob

: Hi, I have a number of Quark docs which were setup for 5 color printing which
: need to be reprinted as 4-color, which means some elements need different
: traps. I have written the following in an effort to change the way a
: yellow box with a black frame traps: tell application “QuarkXPress™
: 4.11”
: activate
: tell document 1
: repeat with x in (object reference of every text box whose {color:“TEXT
: YELLOW”} as list)
: set frame of text box x to {inside trap:default, outside trap:default}
: end repeat
: end tell end tell
: The script runs with no error but the trap of the frame doesn’t change from
: its custom setting to the desired default. Any suggestions? Thanks Rob
Try the following code, it worked for me.

tell application "QuarkXPress™ 4.11 2400"
   activate
   tell document 1
      repeat with x in (object reference of (every text box whose color = "TEXT YELLOW") as list)
         set frame of x to {inside trap:default, outside trap:default}
      end repeat
   end tell 
end tell

When you set the color with the properties then use the color:“name”. If checking that as a variable use color = “name”. Unless someone knows something I don’t.
Also note that x contains the object reference, thus “text box x” really becomes “text box (text box 1 of spread 2 of document “you doc name”)” Since text boxes don’t really contain text boxes nothing is ever found. If this makes sense.
Hope this helps!
Andrew Herzog

Thank you very much Andrew, that worked and now I understand the object reference little better.
: Try the following code, it worked for me.
: tell application “QuarkXPress™ 4.11 2400”
: activate
: tell document 1
: repeat with x in (object reference of (every text box whose color =
: “TEXT YELLOW”) as list)
: set frame of x to {inside trap:default, outside trap:default}
: end repeat
: end tell end tell
: When you set the color with the properties then use the
: color:“name”. If checking that as a variable use color =
: “name”. Unless someone knows something I don’t.
: Also note that x contains the object reference, thus “text box x”
: really becomes “text box (text box 1 of spread 2 of document
: “you doc name”)” Since text boxes don’t really contain text
: boxes nothing is ever found. If this makes sense.
: Hope this helps!
: Andrew Herzog