Outputs the window id of the focused window in a loop