Page 1 of 1

app.project returns undefined in AE7

Posted: February 15th, 2007, 8:42 am
by davestewart
And it's breaking my scripts! I don't understand it...

Can anyone help?

Posted: February 15th, 2007, 9:06 am
by davestewart
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.

Posted: February 15th, 2007, 11:06 am
by byronnash
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...

Posted: February 15th, 2007, 12:01 pm
by Paul Tuersley
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

Posted: February 15th, 2007, 4:54 pm
by davestewart
> 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 :)

estk target

Posted: February 15th, 2007, 10:03 pm
by redefinery
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

Posted: February 16th, 2007, 2:34 am
by davestewart
Sorry Jeff,
What I meant was: YES - THAT WAS IT!
So thanks to Paul for stating "the obvious". Which I had missed.
Duh...

Posted: February 23rd, 2007, 6:19 am
by matt
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.