Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Compare sourceText

  • Compare sourceText

  • Avinash Ramanath

    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"

  • 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.

Viewing 1 - 3 of 3 posts

Log in to reply.

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