我正在尝试在我首选的 IDE 中设置 photoshop 脚本环境。所以我正在使用这里找到的优秀的 Davide Barranca's Package for Sublime 。
我已经安装了这个包并勾选了工具 > 构建系统 > ExtendScript-PS 下的 ExtendScript-PS 选项
这是我用作测试的代码:
#target Photoshop
alert("Done!");
问题出在 Sublime Text 中,当我转到工具 > 构建时,我只是在控制台中得到一个错误转储:
The filename, directory name, or volume label syntax is incorrect.
[Finished in 0.1s with exit code 1]
但是如果我直接在 Windows 资源管理器中执行 Test.Jsx 文件,它在 Photoshop 中就可以正常工作。
所以问题一定是崇高的,有人知道我做错了什么吗?我正在运行最新版本的 Photoshop。任何帮助,将不胜感激。
我的 build.bat 文件是这样设置的:
@echo off
:: Renaming arguments
set jsx_file=%1%
:: Change this accordingly to your CS version
set version= Adobe Photoshop CC 2020
set ps_folder_path=c:\Program Files\Adobe\Adobe Photoshop %version% (64 Bit)
::set ps_folder_path=c:\Program Files\Adobe\Adobe Photoshop %version% (64 Bit)
:: Adobe Photoshop folder location 32 bit versions:
:: set ps_folder_path=c:\Program Files (x86)\Adobe\Adobe Photoshop %version%
cd "%ps_folder_path%"
:: Running script in Photoshop
photoshop.exe "%jsx_file%"
:: Printing happy feedback in the console
echo "Successfully compiled %file_name% to %full_path%\%file_name%";
还有 run.scpt 文件
on run arg
tell application "Adobe Photoshop CC 2020"
do javascript file (arg's item 1)
-- ALTERNATIVELY:
-- do javascript file (arg's item 1) show debugger before running
-- do javascript file (arg's item 1) show debugger never
-- do javascript file (arg's item 1) show debugger on runtime error
activate
end tell
end run