I have a problem with the photoshop channels.
I’m trying to remove a channel if part of its name matches with "MaskFF".
So it could be "MaskFF", or "MaskFF_12345", or "12345 MaskFF".
But so far I haven’t had any luck, everything I use gives me "Error 1302: No such element".
I also tried simple loops like this, to get an alert with the name of each channel:
var doc = activeDocument;
for(i=0; i<doc.channels.length; i++);{
alert(doc.channels[i].name);
}
but even that doesn’t work. Am I doing something wrong?
Any ideas?
EDIT
Seems like there was a semicolon where it shouldn’t have been.
Now the loop works.
2
Answers
I found the answer by myself:
or
Are you sure there is data in the doc object?