Skip to main content
Sayurikp
Participant
July 2, 2021
Answered

Run scripts with Javascript engine

  • July 2, 2021
  • 3 replies
  • 907 views

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

This topic has been closed for replies.
Correct answer Mylenium

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

3 replies

Mylenium
Legend
July 2, 2021

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

Mylenium
MyleniumCorrect answer
Legend
July 2, 2021

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

Sayurikp
SayurikpAuthor
Participant
July 2, 2021

Hmm I see..

 

Do you know if there is some scheduling to update scripting engine?

Mylenium
Legend
July 2, 2021

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

Sayurikp
SayurikpAuthor
Participant
July 2, 2021

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.