ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Trouble with addComp in after effects script

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alan TorresTrouble with addComp in after effects script
by on Jun 24, 2013 at 12:03:19 am

Hey everyone,

I am very new to scripting in After Effects and javascript so please bear with me.

I watched a couple of tutorials and got the hang of it but I quickly ran into an issue.

As of now, all I want this script to do is create a comp with its settings that I define in prompts. I can do this just fine for the comp's name but when I type in something for the comp width I get the error "Unable to call "addComp" because of parameter 2. 1920 is not an integer". How is 1920 not an integer? I tried other numbers to no avail. I am sure this is something very simple to solve.

Here is my script thus far

var compName = prompt("Name of new comp","Comp Name"); //Defines the name of the new comp
var compWidth = prompt("Width of new comp",1920); //Defines the width of the new comp

app.project.items.addComp(compName, compWidth, 1080, 1.00, 200, 23.976);

Return to posts index

Roland R. KahlenbergRe: Trouble with addComp in after effects script
by on Jun 24, 2013 at 8:29:52 pm

It's best to post scripting Qs in the COW's AE Expressions Forum -


Intensive mocha & AE Training in Singapore and Other Dangerous Locations

Imagineer Systems (mocha) Certified Instructor
& Adobe After Effects CS6 ACE

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved