Skip to main content
Inspiring
March 15, 2022
Answered

how to run a render in a terminal (mac os x) from a script?

  • March 15, 2022
  • 1 reply
  • 799 views

Hello.

I have a script that generates commands for rendering in the terminal. and writes them to a file. if I copy them and paste them into the terminal, then everything works.
how can I run a render from a js script using this file, or the commands that the script generates?

This topic has been closed for replies.
Correct answer Mathias Moehl

you could run something like this:

system.callSystem("chmod u+x "+myFile.fsName)

to change the permission of file myFile to be executable

1 reply

Mylenium
Legend
March 15, 2022

Without actually seeing your script code, nobody can give you a satisfying answer. Generally, though, you should have no problem getting this to work with using the .execute() functions and such.

 

Mylenium

Inspiring
March 16, 2022

this does not apply to the code of the script itself. there's nothing interesting there. it is simply written to the command file for rendering. that's it. a file appears on the disk in which these commands are stored. you just need to run it.
on Windows, it is enough to register the bat extension and it can be batFile.execute() and everything will work.
and this won't work on mac os. there it is necessary to give permissions to each file so that it is executable.
I think you can try sending commands directly to system.callSystem(), but I can't figure out how to implement it correctly.
the commands are simple:
"/Applications/Adobe After Effects 2022"/aerender -mp -project "/Users/.../Desktop/2.aep" -sound ON

 

 

Mathias Moehl
Community Expert
Mathias MoehlCommunity ExpertCorrect answer
Community Expert
March 17, 2022

you could run something like this:

system.callSystem("chmod u+x "+myFile.fsName)

to change the permission of file myFile to be executable

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects