app.project returns undefined in AE7

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
davestewart
Posts: 114
Joined: March 10th, 2005, 5:50 am
Location: London, UK
Contact:

And it's breaking my scripts! I don't understand it...

Can anyone help?
davestewart
Posts: 114
Joined: March 10th, 2005, 5:50 am
Location: London, UK
Contact:

OK, this seems to be an ExtendScript Toolkit issue.

app.project comes up as an error when using this, but not if the script is run manually. What a PITA!

Any further thuoghts are VERY welcome.
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

Is the project one converted from AE6.5? I had a script once that gave me all sorts of problems until I figured out that my client was running on an old project opened in v7 as "Untitled". Once he saved the project it worked. I'm not sure if that helps you or not...
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

The only thing I can think of is you haven't set the target to After Effects in the top left of the ExtendScript window....but then that seems a bit too obvious.

Paul T
davestewart
Posts: 114
Joined: March 10th, 2005, 5:50 am
Location: London, UK
Contact:

> The only thing I can think of is you haven't set the target to After Effects in the top left of the ExtendScript window....but then that seems a bit too obvious.

Nothing is ever too obvious! At least, not in this case...
It's been a while since I scripted AE (a good 9 months) and there's only so much room in my (FIFO) head!

Thanks Paul :)
User avatar
redefinery
Posts: 112
Joined: April 1st, 2005, 8:16 pm
Location: CA
Contact:

I would concur with Paul. Confirm that ESTK's target menu is set to After Effects. I've never encountered app.project not returning a Project object in AE7.

Jeff
davestewart
Posts: 114
Joined: March 10th, 2005, 5:50 am
Location: London, UK
Contact:

Sorry Jeff,
What I meant was: YES - THAT WAS IT!
So thanks to Paul for stating "the obvious". Which I had missed.
Duh...
matt
Posts: 1
Joined: February 23rd, 2007, 5:46 am

adding that

Code: Select all

#target aftereffects
line is always a handy sanity check! Also I've been wrapping project calls in a try/except block just to be sure, as scripts tend to fall over if you're in a blank project.
Post Reply