Selecting a layer based on its name + a bit more

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: Tom, Kukurykus

j_forrester

Selecting a layer based on its name + a bit more

Post by j_forrester »

Hi guys and girls,

This is my first post.

Before I start I have to say I have no previous javascript or scripting experience for that matter. I have been using actions for quite a while now but feel I need to learn javascript to take it to the next level. I have looked in the tutorials section but it seems to advise on giving an example of what your looking to do and then understanding the answer with other help. Are there an very simple learning resources to get me on the way? Which text editor is best for PC etc, just any info that any of you guys wish you knew had known a lot earlier.

One task I do on a regular basis is to select a layer, hide all other layers, select all 3 channels and apply this as a mask to a new group set with a corresponding name. example below

layer name "glass mask" - isolate layer and select RGB channels

make group, name it "glass set" and apply mask

In theory what I would really like is for the script to look for any layers including the word "mask" and create a new group which it renames the with the first part of that chosen layer. In this case it would choose "glass mask", create a new group called "glass set" and apply a mask based on the RBG selection from the glass mask layer.

Hope this makes sense. Any help with question or resources would be much appreciated!

Jaimie