Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Using automator to run scripts inside Photoshop

New Here ,
Oct 08, 2025 Oct 08, 2025

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?

TOPICS
Actions and scripting , macOS
143
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Oct 08, 2025 Oct 08, 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. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 08, 2025 Oct 08, 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;

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 08, 2025 Oct 08, 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...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 09, 2025 Oct 09, 2025

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Oct 09, 2025 Oct 09, 2025
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines