This actually won't work:
If Sys.Process("xms").Window("#32770", "Times Series Plot", 1).Exists Then
If the window .Window("#32770", "Times Series Plot", 1), does exist, then clearly its proprties are available including the Exists property. But if it does not exist, then there is no object to check the exists property of.
Instead
If Sys.Process("xms").WaitWindow("#32770", "Times Series Plot", 1, iWhatever).Exists Then
The WaitXXX methods will return an object with at the very least the Exists property. If the wait does not find the desired window, then the exists is false.