Why it works with the try catch is a mystery?
Oh I forgot an important line...
Code: Select alltry{
var chanRef = activeDocument.channels.add();
chanRef.kind = ChannelType.MASKEDAREA;
chanRef.name = "Temp 1";
activeDocument.selection.store(activeDocument.channels["Temp 1"], SelectionType.REPLACE);
}catch(e){}
TRUE Contract command: Listener > DOM
TRUE Contract command: Listener > DOM
Oh snap! Perfect!
Interesting about the try/catch mystery. An undocumented feature, no doubt.
Interesting about the try/catch mystery. An undocumented feature, no doubt.
TRUE Contract command: Listener > DOM
That is strange. It works for me without the try/catch.
On my system setting the channel kind results in an inverted mask.
As you already have a reference to channel couldn't you use
Code: Select allactiveDocument.selection.store(chanRef, SelectionType.REPLACE);
On my system setting the channel kind results in an inverted mask.
As you already have a reference to channel couldn't you use
Code: Select allactiveDocument.selection.store(chanRef, SelectionType.REPLACE);
TRUE Contract command: Listener > DOM
Now, this is interesting. Removing the try/catch on this corrected version worked like Mike says. Hmmm... I think I have a headache now. LOL!
Thanks to both you guys. You are amazing.
Thanks to both you guys. You are amazing.