Skip to main content
Participant
January 11, 2021
Answered

How to select multiple layers with UXP

  • January 11, 2021
  • 1 reply
  • 2761 views

I'm using batchplay to select layer and I wanted to make this function take array of layers name and select them all but I still don't know how to add target to batchplay. any help is appreciated.

 

 

async function testSelect(){
   
   const batchPlay = require("photoshop").action.batchPlay;

   const result = await batchPlay(
   [
      {
         "_obj": "select",
         "_target": [
            {
               "_ref": "layer",
               "_name": "Rectangle 2"
            },
         ],
         "makeVisible": false,
         "_isCommand": false,
         "_options": {
            "dialogOptions": "dontDisplay"
         }
      }
      ],{
         "synchronousExecution": false,
         "modalBehavior": "fail"
      });
}

 

 

This topic has been closed for replies.
Correct answer Kukurykus

Photoshop UXP Plugin API

1 reply

Kukurykus
KukurykusCorrect answer
Legend
January 11, 2021