Script “Merge by layerset name”
Script “Merge by layerset name”
Hi,
in advance ,sorry for my poor English.
I’ll do my best to convey the meaning of the sentence.
I’m Japanese photoshop user,and also very big inner to programming.
I need some advice to scripting.
I made some very simple script to photoshop .
.JSX contents is like this:
------------------------------------------------
try{
while(
lsObj = activeDocument.layerSets["item"] ) {
lsObj.merge();
}}
catch(e){
; // do nothing
}
------------------------------------------------
I wanted to merge each layer sets named by each specific keywords before sending to coworker.
The order is like this .[Merge every layer sets only named “item”]
Usually on the graphic design job,I use ton of PSD file and also after working in photoshop ,each PSD file will be so heavy.
that why I made this scrip to lighten file and put into droplet to automate the process.
Fortunately It works.
Take up to the main question.Now I’m thinking remodeling little bit this script.
I feel unuseful ,because of the Keyword is to much specific .
Some times on the job,I need to put ohther name like “main item”or”item A,B,C.....etc”.
Every moment in this case,I have to rename keyword before running the script.
So now I’m thinking,trying to find the way to place an order like [Merge every layer sets only include string“item”]
Ideally,it will merge every layer sets only what I want to merge.
I tryed to use “indexOf()” or maybe other code but it couldn’t work.
I don’t have the basic programming knowledge.
Please give me some advice If someone know how to do this or have an idea about this.
Hope the sentence convey meaning.
thank you for reading to the end.
