Using AppleScript, is there a way to delete the ‘Colors Not Used’ in Quark?
This is found under Edit>Colors, Show: Colors Not Used
Thanks in advance for any help that you can provide!
Using AppleScript, is there a way to delete the ‘Colors Not Used’ in Quark?
This is found under Edit>Colors, Show: Colors Not Used
Thanks in advance for any help that you can provide!
Posted: Thu Sep 23, 2004
Tony Perkins
Ridgeland, Mississippi
tell application “QuarkXPress™ 4.11”
do script {deleteunusedcolors}
end tell
script deleteunusedcolors
tell application “QuarkXPress™ 4.11”
activate
if document 1 exists then
set ColorsToKeep to {"Magenta", "Yellow", "Black", "Cyan", "Registration", "White"} as list
try
set ColorsToKeep to ColorsToKeep & (name of color of every generic box of document 1)
end try
try
set ColorsToKeep to ColorsToKeep & (name of color of every image of every generic box of document 1)
end try
try
set ColorsToKeep to ColorsToKeep & (name of color of every word of every story of document 1)
end try
set ColorCount to count of color specs of document 1
set ColorsToDelete to {}
tell document 1
repeat with x from 1 to ColorCount
if color spec x exists then
set ThisColor to name of color spec x
if ThisColor is not in ColorsToKeep then
copy x to the end of ColorsToDelete
end if
end if
end repeat
set ColorsToDelete to the reverse of ColorsToDelete
repeat with x in ColorsToDelete
delete color spec x
end repeat
end tell
end if
do updates
end tell
end script