outputModule new File help

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
peteoconnell
Posts: 19
Joined: November 14th, 2004, 2:10 pm

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
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

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")
peteoconnell
Posts: 19
Joined: November 14th, 2004, 2:10 pm

Thanks Paul
Pete
Post Reply