FORUMS: list search recent posts

Extendscript - After Effects warning: Reading past end of file, After Effects Error: strange situation [0/2]

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Spencer Tweed
Extendscript - After Effects warning: Reading past end of file, After Effects Error: strange situation [0/2]
on May 31, 2017 at 10:02:26 pm
Last Edited By Spencer Tweed on May 31, 2017 at 10:04:21 pm

I'm working on a tool and as part of it I save out an after effects file using extendscript. When I run my script via the GUI I get no problems but when I run it via the commandline I get the above error message when I try to open the new file. Everything seems to be totally the same between the commandline version and the gui version so I'm not sure what to do here. I realize this is probably a bug, and if so I need a workaround...

Here's a snippet of my script running via the GUI:

newFile = new File("E:/Programming/Python/Archive tool/AE Project Test/SaveTest.aep");
app.project.save(newFile);
app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES);
app.quit();


I can open this new file no problem.

And to run it via commandline I do the following - this is python but I don't think you need to know python to understand what is happening. I just create a new .jsx file with the same code as above in it (except now I have to tell AE to open the project) and run that script via the commandline:

executeCollectScript.write("""myProject = File('""" + aeProject + """');
app.open(myProject);
newFile = new File("E:/Programming/Python/Archive tool/AE Project Test/SaveTest.aep");
app.project.save(newFile);
app.project.close(CloseOptions.DO_NOT_SAVE_CHANGES);
app.quit();""")
executeCollectScript.close()

ae_app = "C:/Program Files/Adobe/Adobe After Effects CS6/Support Files/afterfx.exe"
filename = filename.replace("/", "\\")

command = '"' + ae_app + '"' + ' -noui -r ' + filename
aeProcess = QtCore.QProcess()
aeProcess.start(command)


...aaand now I get an error. The really wacky thing is if I try running the above python code with After Effects open, AE funnily enough will actually run it in the GUI (ignoring the -noui arg for some reason) at which point it works totally fine! So I think I've pretty conclusively proven that "app.project.save" does not work via the commandline version of AE... Please correct me if I am wrong!

This is all on windows 7 with AE CS6 (sorry, still haven't upgraded due to specific bugs)

PS I realize this error has come up numerous times in the forums and yes I did read through those, but they all seemed to deal with footage and not project files.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]