Skip to main content
Inspiring
February 18, 2025
Question

No document.activeLayer property

  • February 18, 2025
  • 1 reply
  • 249 views

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? 

 

 

1 reply

c.pfaffenbichler
Community Expert
Community Expert
February 18, 2025
app.showAlert (app.activeDocument.activeLayers[0].name);
Inspiring
February 18, 2025

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.

 

c.pfaffenbichler
Community Expert
Community Expert
February 18, 2025

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_Barranca12040269 ’s book/s.