In Quark 5 how would you applescript to add a new color.
Something along the line as
Edit
Color
New
Name = Orange
Model = CMYK
C = 0
M = 52
Y = 72
K = 0
Ok Save
Hi
The simplest manner consists has to manually create a color for then reading its values by using this code:
set MyColor to (CMYK color value of color spec "My Color")
return (coerce MyColor to list)
-->{0, -31457, -18350, 0} for {C = 0, M = 52, Y = 72, K = 0}
It is enough to take again these values to create this color automatically:
set NewColor to (make color spec at beginning with properties ¬
{name:"My New Color", color type:CMYK type ¬
, CMYK color value:{0, -31457, -18350, 0}, separation:true})
That’s exactly what I want to do. But I have one more minor problem I also need to change
Edit
Preferences
Preferences
Measurements
Horizontal: Points
Vertical: Points
Because all the files have different measurements and I need them all to be in points
Hi
Try this:
tell document 1
set horizontal measure to points
set vertical measure to points
--your code
end tell
I Need some help my script works fine sometimes and other times it doesn’t do nothing.
I am looping thru a folder and opening each file in Quark 5. The measurements for my files are all mixed Pica, inches etc. So I am making them all points. Then making a picture box and adding color to it with my set boxprop. If the color exist in my color swatches I don’t want to add a newcolor Just use the existing color. Then Print my document with the new bleed because the New Picture box is created out of the old bleed area. Sometime it prints perfectly with the box and color in the box that is created out of the bleed area Some files get an error Can’t set bleed of print setup of document 1 to 50 Error [-10006]. Other times it just prints my original file without my new picture box that is created outside the bleed area. My param are passed d is the name of the color to add. CY, MA, YE, KE are C,Y,M,K values to be used to create the color. Help Please
on run {d, CY, MA, YE, KE}
set SourceFolder to (choose folder with prompt "Select Folder")
tell application "Finder" to set FolderList to get the name of every folder of SourceFolder
repeat with thisFolder in FolderList
set thisSubFolder to (SourceFolder as string) & thisFolder as string
tell application "QuarkXPress™"
activate
end tell
tell application "Finder" to set filelist to (get the name of every file of folder thisSubFolder whose file type = "XDOC") as list
repeat with thisFileName in filelist
set thisPath to (thisSubFolder as string) & ":" & thisFileName as string
tell application "QuarkXPress™"
try
open file thisPath use doc prefs yes remap fonts no do auto picture import yes
tell document 1
set horizontal measure to points
set vertical measure to points
set boxProps to {bounds:{12, 6, 25, 120}, color:d}
set NewColor to (make color spec at beginning with properties ¬
{name:d, color type:CMYK type ¬
, CMYK color value:{CY, MA, YE, KE}, separation:true})
make new picture box at beginning with properties boxProps
get printer type list of print setup
if printer type of print setup is "Generic B&W" then
set printer type of print setup to "Cannon"
set bleed of print setup to 50
else
set bleed of print setup to 50
end if
print
on error errmsg number errnum
error errmsg number errnum
end try
delete picture box 1
end tell
end try
close document 1 saving no
end tell
end repeat
end repeat
end run