Controlling another window on the screen

Posted on 2006-05-30
Last Modified: 2010-04-01
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)
Question by:JoshWegener
    LVL 4

    Expert Comment

    Get the window handle and use the SendMessage function from Windows API
    LVL 4

    Accepted Solution

    If you can control the other app. only using the keyboard, you can use SendKey. See:

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Hire Top Freelancers to Complete C++ Projects

    Source the talented Expert Exchange community
    for top quality work on your C++ projects.

    Hire the best. Collaborate easily. Get quality work.

    Article by: SunnyDark
    This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
    This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
    The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
    The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now