Frage

i would like to know if there is an easy way to write a simple script in Photoshop.

I would like it to pop a dialog box to let user select a folder. Then the scripts creates another folder ("web_ready") inside selected one and put resized images into it. I can handle the resizing part pretty easily (there is a lot of tutorials on the web) but i don't know how to write the part with dialog box pop-up. Can you help me? I am talking about *.jsx scripts.

War es hilfreich?

Lösung

Folder select dialog:

var inputFolder = Folder.selectDialog("Select a folder to process");

Get the files from the folder:

var fileList = inputFolder.getFiles("*.JPG"); //Use whatever extension you want or no extension to select all files

Do something with the files:

for(var i=0; i<fileList.length; i++) {
    //do something..
}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top