Script Command for "Close Comp"

Scripting for After Effects

Script Command for "Close Comp"

Postby InsertFunnyName on 03/31/2017, 7:49 am

Hi,

if there is a script command for closing a comp that is currently open in the viewer, I haven't found it...
I'm working on a script that requires to open a bunch of comps - using COMP.openInViewer(). I have to open them because I'm using
app.executeCommand(3973); // Layer -> Vectors to Shape Layers

The script so far works fine but it leaves all the processed comps open in the comp view and I'd like to tidy that up a bit. So all I need is a line at the end that closes the comp after it was opened and processed. Does such a command exist?

Thanks in advance.
Smile and be merry for it could be worse! And I smiled and was merry ... and it got worse.
InsertFunnyName
 
Posts: 16
Joined: 05/19/2011, 4:26 am
Location: Germany

Re: Script Command for "Close Comp"

Postby InsertFunnyName on 03/31/2017, 8:02 am

>-|| As usual: post a question, stumble upon the answer you have been looking for for hours 12 seconds later...

If someone is interested:
app.executeCommand(4);
or
app.executeCommand(app.findMenuCommandId("Close"));
which is the same thing.

Sorry, move on. :D
Smile and be merry for it could be worse! And I smiled and was merry ... and it got worse.
InsertFunnyName
 
Posts: 16
Joined: 05/19/2011, 4:26 am
Location: Germany


Return to After Effects Expressions