Page 1 of 1

Script Command for "Close Comp"

PostPosted: 03/31/2017, 7:49 am
by InsertFunnyName
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.

Re: Script Command for "Close Comp"

PostPosted: 03/31/2017, 8:02 am
by InsertFunnyName
>-|| 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