Copy link to clipboard
Copied
Hi guys!
Recently i was working in a way to improve a script that i use to run some files in photoshop, through automator, but i cant find a way to work; let me explain:
So, i have a folder structure that is:
- Pasta mãe
ENVIO OS
1
2
3
....
What i need is a script for automator, (could be shell or Applescript, but manly shell), that first the script locate the folder that have "ENVIO OS", inside the Pasta mãe;
Than in photoshop, runs a ".JSX" file called "Mesclagem de arquivo interno.JSX", that is located in the path "/Users/tratamento/Documentos/Scripts Finais/Mesclagem de arquivos interno.JSX", in the folder "ENVIO OS";
can someone help me, with this script for automator, that makes Photoshop 2025, runs this script?
Copy link to clipboard
Copied
Why is there a requirement to use Apple Automator? How is this being triggered? Please post more details, screenshots etc. The script should be able to do this without any extra complexity or dependencies.
Copy link to clipboard
Copied
Hey!
Its for my work, in the office we aalready use automator to organize our files, like making copies, renaming, but now we need to use photoshop through automator, I tried my best to find a way to photoshop runs this script, but nothing seams to work; but when i runs through file>scripts>browse there is nothing wrong with the script:
At first I tried to add to my script for automator "shell", that works perfectly, but when it comes to the part that activates the photoshop and runs the .jsx script nothing happens;
here is some of my trials
-- Path to the JSX script
set jsxPath to "/Users/tratamento/Documents/Final Scripts/Merge internal file.JSX"
tell application "Adobe Photoshop 2025"
activate
-- Run external JSX script
do javascript ( "var f = new File('" & jsxPath & "'); f.execute();" )
end tell
or
this was the test that i tried to add the photoshop part to the old script in the automator;
#############################################
# :small_blue_diamond: NOVO PASSO: Executa script no Photoshop
#############################################
osascript <<EOF
tell application "Adobe Photoshop 2025"
activate
do javascript file "/Usuários/tratamento/Documentos/Scripts Finais/Mesclagem de arquivos interno.JSX"
end tell
EOF
Copy link to clipboard
Copied
I still don't understand why, or agree that you need to complicate this further with Automator, shell scripts or AppleScript. This appears to be a want, not a need.
Do the JSX work by itself?
P..S. You might want to try escaping the quotes and or looking at directory slash separators. Let me dig up an example...
Copy link to clipboard
Copied
So do i, i don't understand why my team still using automator to do this kind of tasks, but they do, i already tried to show that does not have the necessity to use, but theys still using it;
Btw the .jsx works perfectly by itself, and i tried bolth of the ways;
tell application "Adobe Photoshop CC 2019" activate do javascript of file "/Users/username/Desktop/alert.jsx" end tell
or
tell application "Adobe Photoshop CC 2019" activate do javascript (file "Users:username:Desktop:alert.jsx") end tell
but i keep getting this message that its may not be available in this version of photoshop, and i dont understand why
Copy link to clipboard
Copied
I recommend downloading the official AppleScript documentation for Photoshop, it works just fine. I typicvally write in Extendscript but have done some things in AppleScript as needed.
With a script droplet you can use "on run" and "on open" statements to call Photoshop. Automator can run an AppleScript as well.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now