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

external jsx file don't use ecmascript 5

New Here ,
Jun 12, 2019 Jun 12, 2019

I have a simple .jsx script for AE.

If i use use some ECMAscript 5 statements (like let assignment or arrow functions) the program fail with syntax error:

writeln(app.project.expressionEngine); // ouput javascript-1.0

let a = 1; // Syntax Error: Expected: ;

const something = () => { // Syntax Error: ) does not have a value

     // ...

}

AE project has set javascript as expression engine and expressions inside a property of a composition that use EXCMAScript 5 works correctly.

The problem is only with external jsx file.

TOPICS
Scripting
1.1K
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

Community Expert , Jun 12, 2019 Jun 12, 2019

ExtendScript is based on ES3, it's completely different than the new Javascript Expression Engine which is based on ES6. ES3 doesn't support let or arrow functions. You'll need to use var and standard function(){} instead.

Translate
Community Expert ,
Jun 12, 2019 Jun 12, 2019

ExtendScript is based on ES3, it's completely different than the new Javascript Expression Engine which is based on ES6. ES3 doesn't support let or arrow functions. You'll need to use var and standard function(){} instead.

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 ,
Jun 12, 2019 Jun 12, 2019

oh damn! it is strange that two different engines are used. it would be nice if the external script engine was also updated

thanks

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
Community Expert ,
Jun 12, 2019 Jun 12, 2019
LATEST

ExtendScript is going to be replaced with UXP eventually which is modern JS. See more info on that here: https://medium.com/adobetech/scripting-changes-in-adobes-video-applications-1bee1fc0fe47

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