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

Acrobat Pro DC: Anyone know how to interrupt/stop javascript executions? The Esc key doesn't work anymore...

Community Beginner ,
Jul 12, 2018 Jul 12, 2018

Copy link to clipboard

Copied

I'm not a professional programmer so I test my scripts constantly and I run into infinite loops once in a while...and I'd like to stop the execution.

With XI pro I could just hit the Esc key and the action would stop, but with DC I have to kill the acrobat process. I looked at the options, but no luck.

Is there a key combo that will work like Esc did with XI pro?

TOPICS
Acrobat SDK and JavaScript , Windows

Views

1.0K

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

correct answers 1 Correct answer

Community Beginner , Nov 29, 2018 Nov 29, 2018

Found a solution.

Press the Esc button for about 5 seconds and it will terminate the script.

My guess is that by increasing the time, it resolves the problem acrobat pro XI had where anytime you pressed Esc, regardless of the active window, the script would terminate.

Edit: Tried on multiple occasions after I posted this...doesn't always work. pfft

Votes

Translate

Translate
Community Expert ,
Jul 12, 2018 Jul 12, 2018

Copy link to clipboard

Copied

Pressing Esc multiple times (if you run the code from the Console) usually works.

If you have infinite loops you can add a breaking condition to the code. For example, if it's a for-loop add a condition to break it if the index is greater than 1 million, or something. In most cases that should never happen.

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 ,
Nov 29, 2018 Nov 29, 2018

Copy link to clipboard

Copied

LATEST

Found a solution.

Press the Esc button for about 5 seconds and it will terminate the script.

My guess is that by increasing the time, it resolves the problem acrobat pro XI had where anytime you pressed Esc, regardless of the active window, the script would terminate.

Edit: Tried on multiple occasions after I posted this...doesn't always work. pfft

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