Copy link to clipboard
Copied
I have been developing a script incrementally and it's being executed fine.
When I started to refine it, some "basic" javascript functions get an error when I run the script:
expression.function(...) is not a function
for instance,
string.replace("a","b");
or
date().getfullyear()
Dave
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
.replace() is a text function, so if xyz.replace('a','b') throws the error '. . . is not a function', then xyz is probably not text, but some text object. In that case, you need xyz.contents.replace('a','b').
Peter
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more