adding expression to the source text property of a textlayer

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
payton
Posts: 10
Joined: January 30th, 2009, 4:11 pm

hi again,
here's my last problem to solve. i need to add an expression to the property "source text" of a text layer. i cant find something related to this in the after effects scripting guide. does it mean it is impossible?

that is what i have so far:

Code: Select all

myCounterLayer.property("source text").expression = "abc"; 
thanks in advance (again),
payton
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

Notice the single quotes that wrap the double quotes needed for the expression.

Code: Select all

myCounterLayer.property("Source Text").expression = '"abc"';
If you don't actually need an expression you could set the source text value directly:

Code: Select all

myCounterLayer.property("Source Text").setValue("abc");
payton
Posts: 10
Joined: January 30th, 2009, 4:11 pm

hi paul,
thank you so much for your reply.
unfortunately i did not get an email because of your reply and used a workaround by applying an animation preset.

but your solution is much more...hmmm...better :)

thanks!

payton
Post Reply