Error running script with AE7

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

I have a script I wrote a while back for a client. He recently switched to 7 and got an error. I've pasted the lines around the error. Did any of these methods change in 7? I don't have AE7 yet to test it unfortunately. The last line is the one that produces the error.

Code: Select all

      var time = new Date();
      var day = time.getDate();
      var month = time.getMonth()+ 1;
      var istring = month + "-" + day;
      var currFile = proj.file;
      var currFileName = "Photo Montage";
      var newFile = File(currFile.path + "/" + currFileName + "_" + istring + ".aep");
User avatar
redefinery
Posts: 112
Joined: April 1st, 2005, 8:16 pm
Location: CA
Contact:

Hi Byron,

I'm not aware of any changes that would affect that code. What was the error? Was it "null is not an object"? If so, maybe the project being opened was saved in a previous version? When the project is opened in a newer version (as untitled), proj.file is null.

I noticed similar behavior in one of my scripts. I haven't checked if the same thing occurs in 6.5 when opening a 6.0 or earlier project.

Jeff
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

Yep, that was it. He was opening a 6.5 project in 7 and it wasn't saved. It took me a few rounds to figure that one out. Thanks for the reply Jeff.

-Byron
Post Reply