-
Photoshop scripting add to selection
helloo everyone!
Does anyone know how to select multiple layers via photoshop script? Below is what i have…
function searchBegin()
{
var searchThis = searchInput.text;
var numLayers = activeDocument.layers.length;
for (var i=0 ; i < numLayers ; i++)
{var layerName = activeDocument.layers[i].name;
var matchName = layerName.match(searchThis);
if(matchName == searchThis)
{
var selected = app.activeDocument.layers[i];
activeDocument.activeLayer = selected;
alert(selected);}
}
}this code looks for a text in all the layers and selects all the match.
activeDocument.activeLayer = selected;selects 1 layer at a time… how do I add to the selection.
any help would be greatly appreciated!
thanks!
Sorry, there were no replies found.