in reply to How to get the controls in an application?
Not sure if this is exactly what you want (your question is not really explicit), take a look at spy.pl, part of Win32::GuiTest::Examples.
Martin