Copy link to clipboard
Copied
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?
1 Correct answer
you could run something like this:
system.callSystem("chmod u+x "+myFile.fsName)
to change the permission of file myFile to be executable
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
you could run something like this:
system.callSystem("chmod u+x "+myFile.fsName)
to change the permission of file myFile to be executable

