I am very new to scripting. Here is what I am trying to do. I have a particular layer in a precomp which has to be replaced with two new layers, which I have been able to do it. But I am unable to close the precomp tab and then close the main project. Below is the code
I am looking for the precomp "Blinking_Boxes" in the project plane and then duplicating/replacing them. Once the task is done, I am trying to close the comp using "app.project.item(i).close()". I can close the main project but when I do that and reopen the project with precomp open.
I want this precomp close as I will be using this script for about 10000 files.
Can anyone please help me with it?
var thirdItem= app.project.item(2)
var fourthItem= app.project.item(3)
var secondItem = app.project.item(i);
if (secondItem.name == "Blinking_Boxes")
var mySelection = app.project.item(i);