Using CS3.
Can anyone explain why Illustrator's Javascript considers any Global color a Spot Color? To see what I mean, please follow these steps:
1. Download thisthis .zip archive. It contains a small script which simply presents an alert for each Swatch in the active document, showing the swatch's name and color (type).
2. New CMYK Document. Run the Action named Delete Unused Panel Items. You should end up with only these swatches: [None], [Registration], Black, White.
3. Run the GetDocumentSwatchesInfo script. You'll see that Illustrator's Javascript considers Black and White CMYKColor, and Registration a SpotColor. So far, so good.
4. Swatches Palette flyout menu: New Swatch. Define a new swatch of any color. Make it Process.
5. Run the GetDocumentSwatchesInfo script again. Black, White, and your new swatch are CMYKColor.
6. DoubleClick your new swatch. In the Swatch Options dialog, change it from Process to Spot Color.
7. Run the GetDocumentSwatchesInfo script again. Black, White are CMYKColor; your new swatch is Spot Color.
8. DoubleClick your new swatch again. Change it from Spot Color to Process. But this time, turn on the Global checkbox.
9. Run the GetDocumentSwatchesInfo script again. Your new swatch is shown to be consider a Spot Color, despite the fact it is process.
It seems that any process swatch that I turn on as Global is considered by AI's Javascript to be a Spot Color. If you do an alert that returns app.activeDocument.spots.length, you'll see that the number of Spots includes not just spot color swatches, but spot color swatches plus global swatches.
Is this right? Looking through AICS3 Javascript Reference, I can't find anything to justify this.
Thanks to anyone who bothers to try this, and to anyone who can explain what I'm not understanding here.
JET
Can anyone explain why Illustrator's Javascript considers any Global color a Spot Color? To see what I mean, please follow these steps:
1. Download thisthis .zip archive. It contains a small script which simply presents an alert for each Swatch in the active document, showing the swatch's name and color (type).
2. New CMYK Document. Run the Action named Delete Unused Panel Items. You should end up with only these swatches: [None], [Registration], Black, White.
3. Run the GetDocumentSwatchesInfo script. You'll see that Illustrator's Javascript considers Black and White CMYKColor, and Registration a SpotColor. So far, so good.
4. Swatches Palette flyout menu: New Swatch. Define a new swatch of any color. Make it Process.
5. Run the GetDocumentSwatchesInfo script again. Black, White, and your new swatch are CMYKColor.
6. DoubleClick your new swatch. In the Swatch Options dialog, change it from Process to Spot Color.
7. Run the GetDocumentSwatchesInfo script again. Black, White are CMYKColor; your new swatch is Spot Color.
8. DoubleClick your new swatch again. Change it from Spot Color to Process. But this time, turn on the Global checkbox.
9. Run the GetDocumentSwatchesInfo script again. Your new swatch is shown to be consider a Spot Color, despite the fact it is process.
It seems that any process swatch that I turn on as Global is considered by AI's Javascript to be a Spot Color. If you do an alert that returns app.activeDocument.spots.length, you'll see that the number of Spots includes not just spot color swatches, but spot color swatches plus global swatches.
Is this right? Looking through AICS3 Javascript Reference, I can't find anything to justify this.
Thanks to anyone who bothers to try this, and to anyone who can explain what I'm not understanding here.
JET