There is code in the codebank and in the FAQ here in the API section, to find a window by only part of the caption of a window. Have a look