Copy link to clipboard
Copied
Hello!
On my project I set expression engine to Javascript as follow:
And for expressions inside AE it works ok and recognizes things from most recent Javascript versions.
But when I run an external script, it does not work the same way, so I think it's because it is using Legacy ExtendScript..
Can someone confirm if is this a limitation or am I doing something wrong?
Regards
1 Correct answer
Yes, the scripting engine is built on an older version of ECMA script that indeed does not support some new-fangled stuff introduced in JavaScript in recent years. You have to define functions, variables and objects the old-fashioned way and not rely on the automatisms that come with let().
Mylenium
Copy link to clipboard
Copied
The two architectures have nothing to do with one another, even though they've both been modernized in recent releases. Anything beyond that simple assessment will require much more specific info like what scripts you are using and what they are supposed to do. It's quite possible that you are using an older, outdated script that may simply not deal well with some of those architectural changes.
Mylenium
Copy link to clipboard
Copied
It's not the case because the script is made by myself and it is a script with only this line:
let _x = 1;
This works inside AE expression but within a script this generates an error because it does not recognize 'let' keyword, thats why I assumed that it isn't using Javascript engine.
Copy link to clipboard
Copied
Yes, the scripting engine is built on an older version of ECMA script that indeed does not support some new-fangled stuff introduced in JavaScript in recent years. You have to define functions, variables and objects the old-fashioned way and not rely on the automatisms that come with let().
Mylenium
Copy link to clipboard
Copied
Hmm I see..
Do you know if there is some scheduling to update scripting engine?
Copy link to clipboard
Copied
Adobe has been working on a new unified script engine and UI libraries across all apps for several years, but so far nothing actually usable has come from it and if it does, it's more likely to appear in Photoshop and otehr programs first. Beyond that there realyl isn't much to say. In Adobe land the old "it's ready when you can download it" applies and they never announce it beforehand.
Mylenium

