Hey Chris, I'm not totally sure I understand your problem but would this help? They seem to be able to get the total number of windows as EnumWindows returns a Bool when it ends which I think you can use to figure out when EnumWindows has finished.