Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Re: How to create a script to take channel's name and insert as text into channel in CS5

$
0
0

Oops, replace the for loop with this one.

 

for(var channelIndex = 0; channelIndex<doc.channels.length; channelIndex++){    var newTextLayer = textLayer.duplicate();    doc.activeLayer = newTextLayer;    newTextLayer.textItem.contents = doc.channels[channelIndex].name;    loadActiveLayerTransparencyToSelection();    doc.activeLayer = currentLayer;    doc.activeChannels = [doc.channels[channelIndex]];    doc.selection.fill(black);    doc.selection.deselect();    doc.activeLayer = marksLayer;    loadActiveLayerTransparencyToSelection();    doc.activeLayer = currentLayer;    doc.activeChannels = [doc.channels[channelIndex]];    doc.selection.fill(black);    doc.selection.deselect();    selectComponentChannel();    newTextLayer.remove();
}

Viewing all articles
Browse latest Browse all 27456

Trending Articles