Skip to main content
John_Milham
Participant
June 6, 2015
Answered

Match Name for "Source Text" property

  • June 6, 2015
  • 4 replies
  • 1924 views

Hey there,

I am desperately looking for the "Match Name" for the property "Source Text" of a text layer. This might be right, but I don't know how to continue:

textLayer.property("ADBE Text Properties").property("ADBE Text Document");

I want to use the MatchName so that my script can be used in any AE installation language.

-pete

This topic has been closed for replies.
Correct answer cswaim080880

Hey Pete (or is it John?),

You've got it right so far.  If you want to change the value...you'll do something like this:

var newText = "This is my new text!";


textLayer.property("ADBE Text Properties").property("ADBE Text Document").setValue(newText);


alert(textLayer.property("ADBE Text Properties").property("ADBE Text Document").value);

Hope that helps!

Calvin

4 replies

John_Milham
Participant
June 6, 2015

Thanks for the answers - I didn't know how to retrieve the actual text. ".value" did the trick, sorry if that was obvious

Mathias Moehl
Community Expert
Community Expert
June 6, 2015

Dan and Calvin are correct.

If you ever need to figure out any match names, the script rd_GimmePropPath is your best friend.

Redefinery offers it as a free download:

http://www.redefinery.com/ae/rd_scripts/

It is really simple to use: Just select any property, click a button and it gives you the scripting code you need to access this property (also including match names).

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
cswaim080880Correct answer
Inspiring
June 6, 2015

Hey Pete (or is it John?),

You've got it right so far.  If you want to change the value...you'll do something like this:

var newText = "This is my new text!";


textLayer.property("ADBE Text Properties").property("ADBE Text Document").setValue(newText);


alert(textLayer.property("ADBE Text Properties").property("ADBE Text Document").value);

Hope that helps!

Calvin

Dan Ebberts
Community Expert
Community Expert
June 6, 2015

That looks right to me. What's the issue?

Dan