• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • 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)
  • 2
1 Solution
Get the window handle and use the SendMessage function from Windows API
If you can control the other app. only using the keyboard, you can use SendKey. See:

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

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