Copy link to clipboard
Copied
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
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
Copy link to clipboard
Copied
That looks right to me. What's the issue?
Dan
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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).
Copy link to clipboard
Copied
Thanks for the answers - I didn't know how to retrieve the actual text. ".value" did the trick, sorry if that was obvious