Page 1 of 1

outputModule new File help

Posted: October 9th, 2008, 9:48 pm
by peteoconnell
Hi I am making a little script to automate making MOVs from AVIs and also to have the new file be saved to the location of the original. Everything seems to be working fine except on the last line I get an error. Anyone know what I'm doing wrong?

Code: Select all

var theDuration = (app.project.item(1).duration);
var theWidth = (app.project.item(1).width);
var theHeight = (app.project.item(1).height);
var theName = (app.project.item(1).name);
var thePixelAspect = (app.project.item(1).pixelAspect);
var theFrameRate = (app.project.item(1).frameRate);

var theFileFolder = (app.project.item(1).file.path);
var theFileName = (app.project.item(1).name.toString());
var theComp = app.project.items.addComp(theName,theWidth,theHeight,thePixelAspect,theDuration,theFrameRate);


var theFileNameNoExt = (theFileName.substring(0, theFileName.length-4));
var theRQItem = app.project.renderQueue.items.add(theComp);

var theRQItem.outputModule(1).file = new File(theFileFolder + theFileNameNoExt + "_r.mov"); 

Thanks
Pete

Re: outputModule new File help

Posted: November 18th, 2008, 5:51 am
by Paul Tuersley
I realize this is a little late, but you just need to change the last line to:

Code: Select all

theRQItem.outputModules[1].file = new File(theFileFolder + "/" + theFileNameNoExt + "_r.mov")

Re: outputModule new File help

Posted: December 4th, 2008, 11:11 pm
by peteoconnell
Thanks Paul
Pete