Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Run scripts with Javascript engine

New Here ,
Jul 02, 2021 Jul 02, 2021

Hello!

 

On my project I set expression engine to Javascript as follow:

Screenshot 2021-07-02 at 12.23.00.pngexpand image

 

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

TOPICS
Expressions , Scripting
724
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jul 02, 2021 Jul 02, 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

Translate
LEGEND ,
Jul 02, 2021 Jul 02, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 02, 2021 Jul 02, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2021 Jul 02, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 02, 2021 Jul 02, 2021

Hmm I see..

 

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 02, 2021 Jul 02, 2021
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines