Photoshop的脚本 - 调整中的文件夹的图像(对话框) [英] Photoshop Script - resize images in folder (dialog box)

查看:932
本文介绍了Photoshop的脚本 - 调整中的文件夹的图像(对话框)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有写在Photoshop中一个简单的脚本一种简单的方法。

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

我想它弹出一个对话框,让用户选择一个文件夹。然后脚本创建选择了一个在另一个文件夹(web_ready),并把调整大小的图像进去。我可以轻松地处理部分调整pretty(有在网络上很多教程),但我不知道如何写有对话框弹出的部分。你可以帮我吗?我说的是* .jsx脚本。

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.

推荐答案

文件夹选择对话框:

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

做点什么文件:

for(var i=0; i<fileList.length; i++) {
    //do something..
}

这篇关于Photoshop的脚本 - 调整中的文件夹的图像(对话框)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆