I've reviewed numerous solutions and none of them work. I need to execute a script in After Effects by launching through python. I've found the generic solution: "C:/Program Files/Adobe.../AfterFx.exe" -r "Path/to/my/script/myScript.js"; If I paste this into the windows command prompt, the first part opens/runs afterfx just fine, but it doesn't run the script. If I run the script from within AFX (File:Scripts:Run Script File) it executes correctly. Every variation I've found of this generic solution doesn't work either.
Ultimately I need to run this from python: this_aep = 'X:/path/targetAfterfxFile.aep' os.system(this_aep ) cmd = '"C:/Program Files/Adobe.../AfterFx.exe" -r "Path/to/my/script/myScript.js";' os.system(cmd)
Please help. I'm not a java person or a windows programmer. How can i get AFX to run the damn script automatically? It needs to run on a loaded aep file, so running it on startup won't work and I don't want to to run every time AFX opens.
The script saves as a new file, replaces some footage, renames some text, and renders to a directory provided by a json generated by maya. Everything inside the script executes like it's supposed to if i run from within AfterFX or ctrl+R from visual studio. I need to be able to execute it through python as part of an automated process. If I try to execute through the command line, if AE isn't open it will open it, but it does nothing else, like it's not reading the script at all.
Yes, AE needs to be running and that's not the problem. I have a python command that opens the correct file in After effects (it's just a system call to the file) and then I need to have AE execute the script with that file open.