getWindowHandlesOld function

Get all window handles.