Copy link to clipboard
Copied
Is it possible to ignore the top channel which is usually called 'grey' when in grey mode, and rename all others to have a number as a suffix, so spot channels would be like:
Grey
Red 185
Yellow 101
Black
and then after running the script it'd look like
Grey
Red 185 - 1
Yellow 101 - 2
Black - 3
Many thanks in advance 😄
Try this
var ch = app.activeDocument.channels;
var n = 0;
for (var i = 0; i < ch.length; i++)
{
if (ch[i].kind != ChannelType.SPOTCOLOR) continue;
++n;
ch[i].name += " - " + n;
}
Copy link to clipboard
Copied
Try this
var ch = app.activeDocument.channels;
var n = 0;
for (var i = 0; i < ch.length; i++)
{
if (ch[i].kind != ChannelType.SPOTCOLOR) continue;
++n;
ch[i].name += " - " + n;
}
Copy link to clipboard
Copied
Thank you so much 🙂
If I wanted it as a prefix instead of a suffix how would I go about amending the script?
Copy link to clipboard
Copied
ch[i].name = n + ' - ' + ch[i].name