Changing the color names seems fairly straightforward. This worked in QXP 6.52, OS X 10.4.11:
tell application "QuarkXPress"
tell document 1
set name of color spec "Grid Cyan" to "GRID_CYAN"
set name of color spec "Infill Magenta" to "INFILL_MAGENTA"
end tell
end tell
There's a thread elsewhere on the forum that talks about moving elements to their own layer. It's at http://forums.quark.com/p/20628/82976.aspx#8297. Have you seen it? The script selects text boxes based on their width, and moves them to a certain layer. With thanks to the original posters, I was able to adapt the script to work with color names. I just did a couple of quick tests in 6.52, OS X 10.4.11:
tell application "QuarkXPress"
tell document 1
make new layer at beginning with properties {name:"newLayer"}
set mypage to count of pages
repeat with a from 1 to mypage
set mycountbox to count of every generic box of page a
show page a
tell page a
repeat with b from 1 to mycountbox
set myboxcolor to name of color of generic box b
--display dialog myboxcolor
if myboxcolor is "GRID_CYAN" then
move text box b to beginning of layer "newLayer"
else if myboxcolor is "INFILL_MAGENTA" then
move text box b to beginning of layer "newLayer"
end if
end repeat
end tell
end repeat
end tell
end tell
Note that this script creates a new layer, then moves objects to that layer. If the layer already exists, comment out the line that makes the new layer (putting 2 dashes at the beginning of a line of applescript turns that line into a comment, so it is not acted on), and change the layer name as needed. Also, this script acts on "generic box"--you may need to change that, to text box, or picture box, or whatever.
I don't have access to QXP 7 right now, but I think the Preference you want to set may be handled as a property. Properties are set pretty easily. This sets the snap distance for the General preference in 6.52:
tell application "QuarkXPress"
tell document 1
set properties to {snap distance:12}
end tell
end tell
Got to run.