I am running a screen swap timer script that cycles through 3 different windows every 30 seconds. I am curious to know if there is a way I can pause this scrip while I have a different window, that's not on the swap list, open. Here is the script I am using:
windows = ["lineDriveMotorData", "laminatorMotorData", "filledCoatingMotorData"]
currentWindow = system.tag.getTagValue("[System]Client/User/CurrentWindow")
try:
idx = windows.index(currentWindow)
except:
idx = 0
if idx == (len(windows) - 1):
idx = 0
else:
idx += 2-1
nextWindow = windows[idx]
system.nav.swapTo(nextWindow)
I have a separate window that is accessed by a tab strip, and I do not want this script to run while I am on that tab (it is a historical table that we will ideally need a longer time on to reach what we are searching for.)
Ideally, I would like to resume the timer script when we navigate back to the "Auto Roll" tab.
Thanks for any advise.