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

How to stop a long running script?

New Here ,
Sep 08, 2021 Sep 08, 2021

So I have some scripting that automates a number of pre-press tasks and occasionally the artwork is very complex which ends up bogging down the scripts. I would like to be able to cancel the script while its running but I havent figured out a way to interupt it.

 

Is there an interupt key combo I can press to stop a running script?

TOPICS
Feature request , Scripting
1.2K
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
Adobe
Community Expert ,
Sep 08, 2021 Sep 08, 2021
LATEST

It seems that the contents that appeared in the InDesign community in the past can be diverted.

https://community.adobe.com/t5/indesign-discussions/press-escape-to-stop-the-script/m-p/10939058

 

The escape key will stop the script.
In the case of Illustrator, you can get to the end by using loops or functions well.

var doc = app.documents.add();
var tf = doc.textFrames.add();
tf.top = 800;
tf.textRange.pointSize = "2pt";

while (ScriptUI.environment.keyboardState.keyName != "Escape") {
    tf.textRange.contents += "press esc key to stop the script.\r";
    app.redraw();
}

 

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