Page 1 of 1

typeName differences depending on app.language

Posted: April 8th, 2010, 1:29 pm
by cardeiro
I have a script that makes a list of all compositions in the project by testing

Code: Select all

 if(item.typeName == 'Composition') 
A person using the script was having errors and it turned out that the language they are running after effects in would have me write

Code: Select all

 if(item.typeName == 'Komposition') 
Is there a language independant way to test if an item is a composition?

Re: typeName differences depending on app.language

Posted: April 8th, 2010, 4:37 pm
by Dan Ebberts
Like this:

if (item instanceof CompItem)


Dan

Re: typeName differences depending on app.language

Posted: April 9th, 2010, 5:42 am
by cardeiro
Dan Ebberts wrote:Like this:

if (item instanceof CompItem)

Brill-Yent! Thanks Dan (again), you are like a scripting/expressions cyborg