Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting
Moderators: xbytor, DavideBarranca, Paul MR
- Posts: 2
- Joined: Tue Jan 30, 2018 7:51 pm
I am trying to make layer groups active in order to rename them. I can do it to a layer outside of a group but not to the group itself. It was my understanding that groups were treated the same as the art layers.
Why does the below code only work on art layers and not on layer sets?
Code: Select all
var doc = app.activeDocument;
doc.activeLayer = doc.artLayers.getByName("test");
app.activeDocument.activeLayer.name = "Hi there!"
- Posts: 195
- Joined: Mon Jul 25, 2016 12:36 pm
Change 'artLayers' to 'layers' or if you have artLayers and groups with the same name then to 'layerSets'.