• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 208
  • Last Modified:

Controlling another window on the screen

Say I have Java program running (not my program nor do I have source for it), How can I interact with the window with my another program?

What I am trying to do is to fill in information into a Java window when it opens (from a different program). So window X opens and then (this program) fills in the information into the field (lets call the field first name) and clicks send. (then waits for the X window to re-open) And it just keeps doing this... ( wait, fill, wait, fill.... )

Please include code (examples)
0
JoshWegener
Asked:
JoshWegener
  • 2
1 Solution
 
e_tadeuCommented:
Get the window handle and use the SendMessage function from Windows API
0
 
e_tadeuCommented:
If you can control the other app. only using the keyboard, you can use SendKey. See:

http://www.codeproject.com/cpp/sendkeys_cpp_Article.asp?print=true
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now