Skip to main content
Inspiring
July 12, 2018
Answered

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

  • July 12, 2018
  • 2 replies
  • 1525 views

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?

This topic has been closed for replies.
Correct answer skinjp

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

2 replies

skinjpAuthorCorrect answer
Inspiring
November 30, 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

try67
Community Expert
Community Expert
July 12, 2018

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.