in reply to Set Focus
Win32::GuiTest has a lot of handy functions for Windows manipulation stuff like setting focus.