Help with using ExtendScript in Sublime Text editor please
Copy link to clipboard
Copied
I am trying to set up photshop Scripting environment in my preffered IDE. So I am using the excellent
Davide Barranca's Package for sublime-ps-extendscript.
I've installed the package and have ticked ExtendScript-PS option found under Tools > Build System > ExtendScript-PS
This here is the code I am using as a test.:
#target Photoshop
alert("Done!");
The issue is in Sublime Text, when I go to Tools >Build I just get an error dump in the Console:
The filename, directory name, or volume label syntax is incorrect.
[Finished in 0.1s with exit code 1]
But if I directly execute the Test.Jsx file in windows explorer, it works just fine in Photoshop.
So the issue must be with sublime, Any know what I could be doing wrong? I am running latest version of Photoshop. Any help would be appreciated.
My build.bat file is set up like this:
@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%";
And the run.scpt file:
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
Explore related tutorials & articles
Copy link to clipboard
Copied
I used sublime as well in the past and since the 64-bit thing happened that broke the original extendscript debugger, I switched IDE to VS Code.
Your code is perfectly valid, so the problem has to pertain to either sublime, the config, or photoshop.
If you are open to another IDE, you could try out Visual Studio Code instead of sublime text.
It comes recommended by Adobe and has a 64-bit debugger extension maintained by Adobe.
- Visual Studio Code found here: Visual Studio Code
- Debugger to install as a VSC extension found here: ExtendScript Debugger)
Hope it helps you out! ¯\_(ツ)_/¯
Copy link to clipboard
Copied
I wish I could. but I am deeply nested in sublime. I am using it for more than just PS scripting so I dont have the time it would require to undo all of this.
Can you explain to me when you say
"the 64-bit thing happened that broke the original extendscript debugger" Maybe I can revert back to a working version
Thanks for your help anyways
Copy link to clipboard
Copied

