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

Event listener in illustrator

Community Beginner ,
May 09, 2022 May 09, 2022

Copy link to clipboard

Copied

We have many errors for several eps files and have written several scripts to work properly with manual execution. But some eps files have no errors.

How to write if there is an error on the open illustrator document.

TOPICS
Scripting

Views

512

Translate

Translate

Report

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
Adobe
Community Expert ,
May 09, 2022 May 09, 2022

Copy link to clipboard

Copied

Sorry @javithj89048510

 

Please imagine that you do not know how these files were created and how they are structured. And please also imagine that you do not know what the scripts do (or should do), how and in which script language they are written, nor what error messages there are or are not. You know neither the Illustrator version nor the operating system.

 

Please read your post again from this point of view.

Votes

Translate

Translate

Report

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
Valorous Hero ,
May 09, 2022 May 09, 2022

Copy link to clipboard

Copied

I suggest this solution: use the try-catch statement to wrap the script!

 

try {

  function myScript () {

    throw new Error("It was a failed script :(");

  }

  myScript();

} catch (e) {

  alert(e.message);

}

Votes

Translate

Translate

Report

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 Beginner ,
May 10, 2022 May 10, 2022

Copy link to clipboard

Copied

Thanks Silly-V

Kindly help me if illustrator have addEventListener method for javascript

Votes

Translate

Translate

Report

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 Beginner ,
May 10, 2022 May 10, 2022

Copy link to clipboard

Copied

LATEST

 

Thanks pixxxelschubser

Kindly help me if the illustrator has addEventListener method for javascript.

Votes

Translate

Translate

Report

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
Guide ,
May 09, 2022 May 09, 2022

Copy link to clipboard

Copied

There is no global onError event handler or "error" event listener which will do what I think you want.

Votes

Translate

Translate

Report

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 Beginner ,
May 10, 2022 May 10, 2022

Copy link to clipboard

Copied

Thanks femkeblanco,

Kindly help me if the illustrator has addEventListener method for javascript.

Votes

Translate

Translate

Report

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