in reply to Tool GUI automation
In addition to what kcott has already said perhaps Win32::GuiTest or X11::GUITest would be of interest.