Highlighted

Running a script from the command line is opening the After Effects GUI

New Here ,
Apr 04, 2020

Copy link to clipboard

Copied

Hi there,

I'm wanting to headlessly run a script using the AfterFX -r command like so:

 

afterfx -r c:\script.jsx

 

But this seems to open up the full After Effects interface, runs the script, then immediately closes After Effects, I was wondering if this is normal, is it not meant to run the script headlessly, as in no GUI? The fact that in opens up After Effects seems to defeat the point, or am I missing something?

 

Thanks for any clarification on this

Steve

Topics

Scripting

Views

440

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Running a script from the command line is opening the After Effects GUI

New Here ,
Apr 04, 2020

Copy link to clipboard

Copied

Hi there,

I'm wanting to headlessly run a script using the AfterFX -r command like so:

 

afterfx -r c:\script.jsx

 

But this seems to open up the full After Effects interface, runs the script, then immediately closes After Effects, I was wondering if this is normal, is it not meant to run the script headlessly, as in no GUI? The fact that in opens up After Effects seems to defeat the point, or am I missing something?

 

Thanks for any clarification on this

Steve

Topics

Scripting

Views

441

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Apr 04, 2020

Copy link to clipboard

Copied

Okay I've figured it out, seems that I can just use -noui to execute without opening the ui

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Apr 06, 2020

Copy link to clipboard

Copied

The -noui flag is pretty glitchy. I'd recommend using the AfterFX.com executable for headless on Windows, or aerender.exe if you only need to render.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Apr 06, 2020

Copy link to clipboard

Copied

Great, thanks for the advice 👍

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Jun 05, 2020

Copy link to clipboard

Copied

Hi

 

I am running the script from cmd line using -noui flag but it gives me error error.png

and if I run this without -noui flag it opens the After Effects and run the script without any problem but -noui flag gives the warning "Could not rename the file".

this is the test script below:-

app.beginUndoGroup("test");



var myAepFile = File("~Desktop//testTemplate//testTemplate.aep");
if (myAepFile.exists) {

app.open(myAepFile); //fails on this line with app.open is not a function

}

app.project.close(CloseOptions.SAVE_CHANGES);

app.endUndoGroup();

 

Any help would be much appreciated

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jun 05, 2020

Copy link to clipboard

Copied

Try running as administrator, or reset the permissions of that file.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Jun 05, 2020

Copy link to clipboard

Copied

Hi Justin,

Yes I tried run it as administrator but no avails . BTW how we can change permissions of the file?

 

Thanks

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jun 06, 2020

Copy link to clipboard

Copied

I think you're on Windows, here's how: https://www.laptopmag.com/articles/take-ownership-folder-windows-10-using-file-explorer

 

Or you can just create a new script file in a non-restricted location and try that.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Happyjas LATEST
New Here ,
Jun 08, 2020

Copy link to clipboard

Copied

Hi Justin,

 

I have tried everything but nothing works. It's weird that it only works when After Effect is open but doesn't work when it opens in background.

 

Let me know if have any other solution.

Thanks anyway.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...