Skip to main content
Known Participant
Dec 15, 2020 3:41 PM UTC
Question

Execute a .jsx script with Python 3

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 is closed to new replies. Start a new post to keep the conversation going.

3 replies

Known Participant
Dec 21, 2020 5:02 PM UTC

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 ! 

 

Translate
Kukurykus
Legend
Jan 2, 2021 2:40 AM UTC

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

Translate
Known Participant
Jan 29, 2021 4:31 PM UTC

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

Translate