FORUMS: list search recent posts

Photoshop scripting add to selection

COW Forums : Adobe Photoshop

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Nicholas Joseph
Photoshop scripting add to selection
on May 3, 2012 at 6:56:17 am

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!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]