Skip to main content
AYS__HAKKIM
Inspiring
April 10, 2009
Question

How to stop running script??

  • April 10, 2009
  • 1 reply
  • 3635 views

Hi all

I've to stop running script through another script. is there a way to do it?

many thanks, H

This topic has been closed for replies.

1 reply

Inspiring
April 10, 2009

I'm curious what is the purpose of one script stopping another? Can you explain a bit?

JS, VBS, AS?

In General: you can stop a running script between statements. You can't stop a script while it's waiting for InDesign after giving a e.g. print-command, until the printing is done.

The Running script is probably a loop?

In each loop cycle it has to check (maybe several time) if the condition to Stop is there. If it is, it has to reset the condition and satop.

Apparently there are no Global Variables that scripts can share. You can use e.g. app.label.

I know of a solution that uses smal a disk file, named "stopnameofrunningscript". If the file is created, the script deletes it and quits.

Make sure that the script gives other scripts and apps enough time to do their thing, otherwise it takes ages before the other script can change the condition (e.g. interact with the user if that is desired). 

AYS__HAKKIM
Inspiring
April 10, 2009

Well, Actually I do an automation. It will automatically take files from a folder and flows one by one into indesign then places figures and tables. finally the indd files will be moved to production. In certain situation we'll have to stop the process.

Inspiring
April 10, 2009

"Certain conditions": write a function that checks these conditions and make it the last statement of your loop?

Or do you want the user to pause/resume ?