I'm writing a script to create a new AI document with a restricted swatchbook. The designer is supposed to use only the swatches/inks provided by this script.
So far I was able to delete all current swatches and add a CMYK or RGB spotcolor swatch.
var inkt02 = app.activeDocument.spots.add();
inkt02.name = 'inkt 2';
inkt02.colorType = ColorModel.SPOT;
var kleur02 = new CMYKColor();
kleur02.black = 10;
kleur02.cyan = 80;
kleur02.magenta = 0;
kleur02.yellow = 90;
inkt02.color = kleur02;
var newSpotColor = new SpotColor();
newSpotColor = inkt02;
newSpotColor.tint = 100;
Often we will be dealing with Pantone colors. No need to define these, as they are inside AI already, right? But how to call them from the library?
I'm new to ExtendScript, but this forum (and google) helped me along nicely so far :-) I don't have a concrete use case for this yet, but I decided on this exercise as a good way to learn about ExtendScript.
I don't have a solid scripting background, but it does seem very powerful. There are limitations at everything, I'm sure I won't need the library for every exercise that pops my mind...
I'm in the printing industry, not a designer myselves. The idea behind the script is a connection with the sales side. In the sales tool is defined what inks can be in the to-be designed artwork. Currently this has to be communicated (mail, order sheet...) I thought it would be nice if the server can create upfront an AI with the limited inkset inside. Aiming for a paperless office!
Thanks for the help! I'm sure I'll visit this forum more often.