Skip to main content
Known Participant
December 15, 2020
Question

Execute a .jsx script with Python 3

  • December 15, 2020
  • 1 reply
  • 1152 views

Hello,

Do you know how to execute a .jsx script with Python 3 ? 

The idea is to use Python to give an input image and an output path to the .jsx script.

The .jsx script calls Adobe Bridge and modifies the image.

 

Thanks in advance ! 

This topic has been closed for replies.

1 reply

Known Participant
December 21, 2020

Hello ! 

You can find this post on Adobe Community. It works under Windows as there is a Bridge.exe

In the official documentation for after effects, it is possible to run a script via this command line : 

"path_to_adobe_software.exe" -r "path_to_your_script.jsx" 

 

In order to add arguments, people recommand to save the arguments in text files. Then, to read the text file with the .jsx script (see this post). This way works.

 

Do you know if there is a specific command to do it with arguments parsing from command line ? Do you know why process.argv is not recognized ? 

 

Thank you in advance ! 

 

Kukurykus
Legend
January 2, 2021

vbscript can read arguments from command line when the .vbs runs there .jsx after which you put args.

 

system('start "" c:\\runJSX.vbs c:\\JSX.jsx someArguments moreArguments')

 

Of course you must write your .vbs too, but then by ran .jsx you can for example alert(argumetns).

Known Participant
January 29, 2021

Thanks a lot @Kukurykus and i'm sorry for my late reply. I'll test with vbs and let you know.