As well as Wes' comment (should also count as a solution), you can try taking a look at the MS UI Automation Framework (.NET API). Assuming the other program wasn't written in Java (I've found that most of those don't expose their UI Automation IDs and properties), you'll actually get a .NET API allowing you to automate really large parts of the other application
MSDN Link[
^]