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

No document.activeLayer property

Engaged ,
Feb 18, 2025 Feb 18, 2025

Copy link to clipboard

Copied

Documentaion is minimal at best , but...

 

Why is there no document.activeLayer property in .PSJS? 

 

Is it because there can be more than one selected active layer? In which case which one is zero indexed? Or have the Adobe developers just decided to make everything even more difficult? 

 

 

TOPICS
Actions and scripting

Views

71
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
Community Expert ,
Feb 18, 2025 Feb 18, 2025

Copy link to clipboard

Copied

app.showAlert (app.activeDocument.activeLayers[0].name);

Votes

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 ,
Feb 18, 2025 Feb 18, 2025

Copy link to clipboard

Copied

That's right that'll show (alert) the active layers as a collection, but the fact that the heavily relied upon use of activeLayer is now going to be swept under the carpet, without mentioning that it's now missing or here's how it's done nowadays from the documention is increadibly frustrating.

 

Votes

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
Community Expert ,
Feb 18, 2025 Feb 18, 2025

Copy link to clipboard

Copied

As for the quality of the documentation Adobe does provide … well, less said might be better. 

If you really want to pursue UXP Scripting you might want to look into buying @Davide_Barranca ’s book/s. 

Votes

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 ,
Feb 19, 2025 Feb 19, 2025

Copy link to clipboard

Copied

LATEST

I'm aware of Davide's book and it may come down to that.

...until then I'll try and stick with good old Photoshop ECMA script.

 

Votes

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