Looping through all open windows using the simple for loop