Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Compare sourceText

  • Compare sourceText

    Posted by Avinash Ramanath on October 15, 2019 at 12:36 pm

    Is there a way to compare source text of the current layer with the text layer of another comp. I need to use this information to control some keyframe values
    currently am using the below method but not getting any results.

    var chkText = comp("Comp 1").layer("Line_1")("ADBE Text Properties")("ADBE Text Document");
    if(text.sourceText === chkText){
    text.sourceText = "True"
    text.sourceText = "False"

    Avinash Ramanath replied 3 years, 10 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 15, 2019 at 4:38 pm

    I think you just need to add .value when you reference the text. I’d do it like this:

    var chkText = comp(“Comp 1”).layer(“Line_1”)(“ADBE Text Properties”)(“ADBE Text Document”).value;
    text.sourceText.value === chkText ? “True” : “False”;


  • Avinash Ramanath

    November 4, 2019 at 6:36 am

    Sorry for the late reply, Thanks for this Dan, I will check and share an update.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy