To avoid rotating through hidden windows, just check:

$window(%window.variable).state

If it == hidden, then increment your %window.variable instead of activating the window. From a quick scan of your script, I'm guessing that is %nwin, but I didn't really look that closely.


Invision Support
#Invision on irc.irchighway.net