hi
i'm new to ae scripting but i got some of my scripts working somehow.
now i'm dealing with a problem: how to duplicate a project item?
i've seen in the scripting guide a way to duplicate a layer, and i tried different modifications of that to duplicate the project item, but i just cant get it to work.
any one can help?
and i just hope that the duplicate() function returns a index of the duplicated item, am i right?
oh. and btw... is there a way to add a Event Listener to AE7? for example... i have a script in Startup folder that creates a folder structure that i like to work in, but when i go to File > New project i loose it and i have to run the script by hand. is there a way to set the script to listen for event "New project" and then execute?
duplicate project item
Moderator: Paul Tuersley
Hey explorer,
1.
returns a CompItem object if item 1 is a comp.
2. I don't think so
1.
Code: Select all
app.project.item(1).duplicate();
2. I don't think so
- redefinery
- Posts: 112
- Joined: April 1st, 2005, 8:16 pm
- Location: CA
- Contact:
Hi explorer,
Is the topmost (first) item in the Project panel a composition? If not, it's expected that duplicate() won't work as it's defined only for CompItem objects (i.e., compositions), not for folder or footage items.
If the first item is a comp, maybe you're using an earlier version of AE that doesn't support it? I don't have a copy of 6.0 here, but it does work in 6.5 and 7.0.
Hope that helps.
Jeff
Is the topmost (first) item in the Project panel a composition? If not, it's expected that duplicate() won't work as it's defined only for CompItem objects (i.e., compositions), not for folder or footage items.
If the first item is a comp, maybe you're using an earlier version of AE that doesn't support it? I don't have a copy of 6.0 here, but it does work in 6.5 and 7.0.
Hope that helps.
Jeff
i have AE7.0, and what im trying to do is to automate something that i do. first step is to select a footage in the project window, duplicate it and change its interpretation. i got everything figured out but i can't duplicate the item.