I try to stop a running script from another script but no success.
Start the first script and when it is running/sleeping, start the second script.
Sample below
Best regards, Walter
First script
- Code: Select all
eg.globals.StopTheScript = False
ind = 1
while ind < 5:
if eg.globals.StopTheScript == True:
eg.Exit()
remain = int(time.strftime("%S", time.localtime()))
if remain > 30:
remain = remain - 30
print 30-remain
time.sleep(30-remain)
ind += 1
The second script
- Code: Select all
eg.globals.StopTheScript = True
eg.Exit()
