Prevent script execution if script is running

Hi,

I would like to prevent script execution if the script is already running. I am using OnBeforeExecute. Is there a way to stop execution process if the script is running?

Kind regards

You can use Halt method to stop script execution.

Hi,

I already have a script running but it is not finished. So before running it again (lets say on timer) I do not want a new execution. I can do this by additional variables, which I would activate after the script is done... but some kind of internal function would be nice. I tried OnBeforeExecute check if script is already running, if it is then prevent new execution, otherwise run the script. So the question is how to prevent execution OnBeforeExecute without stopping the running script?

Kind regards

Can't you simply check the Running property before executing it again?

if not Scripter.Running then
  Scripter.Execute;

OK, this will work but I will have to change some internal logic.
Thank you!

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.