Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe Photoshop Photoshop scripting add to selection

  • Photoshop scripting add to selection

    Posted by Nicholas Joseph on May 3, 2012 at 6:56 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!

    Nicholas Joseph replied 14 years, 3 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy