Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


How to select multiple layers with UXP

New Here ,
Jan 11, 2021 Jan 11, 2021

Copy link to clipboard

Copied

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"
      });
}

 

 

TOPICS
Actions and scripting, SDK

Views

443

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Jan 11, 2021 Jan 11, 2021

Likes

Translate

Translate
Adobe Community Professional ,
Jan 11, 2021 Jan 11, 2021

Copy link to clipboard

Copied

LATEST

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines