Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to select multiple layers with UXP

New Here ,
Jan 11, 2021 Jan 11, 2021

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
2.7K
Translate
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

LEGEND , Jan 11, 2021 Jan 11, 2021
Translate
Adobe
LEGEND ,
Jan 11, 2021 Jan 11, 2021
LATEST
Translate
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