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

How to get more than 2 layer properties

Engaged ,
May 29, 2019 May 29, 2019

Copy link to clipboard

Copied

hello,

     for example,i wanted to get layer's name and visible,but don't get all layer property because of watse times.when the getting one's feasible use "putProperty" but more than two is fail.How to get more than 2 layer properties please?

    

QQ截图20190530100948.png

TOPICS
Actions and scripting

Views

1.2K

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 Employee , Jun 03, 2019 Jun 03, 2019

There is no way to get two using one call to Photoshop. Just call Photoshop twice, once for each property you want. The time hit on calling for all properties is what you want to avoid!

Votes

Translate

Translate
Adobe
Community Expert ,
May 30, 2019 May 30, 2019

Copy link to clipboard

Copied

I do not know how to use action manager executeActionGet, But I would thing you woyl need to target some layer  like the activelayer to get layer information.   I do not see any layertarget pramenter for yoy GetIbfo function.   if yoy are goinf after the active layer wiul the not be:

alert(app.activeDocument.activeLayer.name  + " Visible= " +  app.activeDocument.activeLayer.visible);

Some Object needs  to be addressed

JJMack

Votes

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
Engaged ,
May 30, 2019 May 30, 2019

Copy link to clipboard

Copied

thanks,That's not what I wanted,

Votes

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
Engaged ,
May 30, 2019 May 30, 2019

Copy link to clipboard

Copied

@r-bin

Is there a way please?such as " ActionList"

Votes

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
People's Champ ,
Jun 01, 2019 Jun 01, 2019

Copy link to clipboard

Copied

It does not work two either. More than two does not work, but does not cause errors. What is your error?

You can use it. But there will be access not to all properties.

var r = new ActionReference();

r.putEnumerated(stringIDToTypeID("layer"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));

d = executeActionGet(r);

Slowly working for "application" and "document";

Votes

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
Adobe Employee ,
Jun 03, 2019 Jun 03, 2019

Copy link to clipboard

Copied

LATEST

There is no way to get two using one call to Photoshop. Just call Photoshop twice, once for each property you want. The time hit on calling for all properties is what you want to avoid!

Votes

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