Skip to main content
Participant
October 8, 2025
Question

Using automator to run scripts inside Photoshop

  • October 8, 2025
  • 1 reply
  • 282 views

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?

1 reply

Stephen Marsh
Community Expert
Community Expert
October 9, 2025

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. 

Participant
October 9, 2025

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;

#############################################
# 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

Stephen Marsh
Community Expert
Community Expert
October 9, 2025

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

 

https://community.adobe.com/t5/photoshop-ecosystem-discussions/running-a-jsx-script-with-applescript-in-photoshop-using-do-javascript/m-p/11035403