I am writing a Java application that "passively" interacts with a Windows Desktop Application. What I mean when I say that it interacts "passively" is that I perform screen captures to determine the location of "buttons" displayed by this Desktop Application and I use "absolute" x and y coordinates to "click" or "select" these buttons.

I have written a lot of test automation using "MS Test", a.k.a. "Rational Visual Test", a VB based test automation framework, so I know a bit about how to "actively" interact with an application. This is a far superior way of controlling the interaction between the "test application" and the "application under test".

I am pretty new to OOP and Java, but it would seem that if I could somehow get the handle of the application I am "testing" that I could have a lot more control over it, BUT how difficult is it for a "noob" like me to get that handle? I suspect I will need to delve into JNI and possibly some C++ code (yuck). Is there a way to do this without all the "overhead"?

I am mainly just trying to decide if it will be worth my time to research all of this now, or just continue with the passive approach, until my Java skills catch up to my needs.

Thanks,
Tahoe

I don't know any java code dealing with window handles.

This should do it. includes a sample prog that does exactly that.

This should do it. includes a sample prog that does exactly that.

I was just reviewing my old posts and realized I forgot to say "Thanks Jim!"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.