Photoshop Script - resize images in folder (dialog box)

谁说我不能喝 提交于 2019-11-27 07:13:58

问题


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.


回答1:


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..
}


来源:https://stackoverflow.com/questions/10257646/photoshop-script-resize-images-in-folder-dialog-box

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!