in reply to Find window by name and close it
I recommend AutoIt when in need to manipulate Windows GUI elements explicitly. It's a more Windows-GUI oriented tool, and for a specific job might be easier to use than Perl.
Stop saying 'script'. Stop saying 'line-noise'.We have nothing to lose but our metaphors.