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.
You can't pause it. But you can use system.gui.getWindow() inside a try - except block to retrieve the subject window, and do the swapping in the except clause (when the window is not present).
Perfect! Thank you very much.
Could you please share the working script for this please Id like to steal it 
windows = ["Line_Speed_V2", "Process_Temps", "Line_Output", "Line_Efficiency"]
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)
This is what I have and it works flawlessly
Im sorry, I posted a different window change script that I am using.
This is the one that I am running relevant to this topic
windows = ["lineDriveMotorData", "laminatorMotorData", "filledCoatingMotorData"]
currentWindow = system.tag.getTagValue("[System]Client/User/CurrentWindow")
try:
system.gui.getWindow("historicalTables")
except:
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)