ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Compare sourceText

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Avinash Ramanath
Compare sourceText
on Oct 15, 2019 at 12:36:13 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"
}
else{
text.sourceText = "False"
}


Return to posts index

Dan Ebberts
Re: Compare sourceText
on Oct 15, 2019 at 4:38:44 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";


Dan



Return to posts index

Avinash Ramanath
Re: Compare sourceText
on Nov 4, 2019 at 6:36:05 am

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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]