Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There's so many individual, useful programs out there who's source code isn't available, some of which would integrate beautifully with each other! The only problem is I don't know how to enable different programs to interact with each other in Windows 7.

I know C++/C#/XAML; understand how to use the command line to pass start-up arguments to programs, and how to make batch files... But how do you non-manually control programs once they're running?

I also know how to hand Windows input such as mouse movements or clicks, but this only allows direct interaction with the operating system, not specific programs that are open at the time.
I want to be able to pass input to individual programs while doing other stuff.

Here's an example problem I'm trying to solve:

I have a program I call "Member Extractor" that extracts my site's member's contact information; although the program can only be controlled through its GUI; and doesn't have the ability to export the data yet. (so each piece of information such as Email, Phone #, etc. must be copied to the clip board 1-by-1, and pasted into a new "Microsoft Excel" document).

Once the information is copied and saved in an organized way, I need to import that data 1-by-1 to multiple new "Contact Profiles" generated by the "Universal Contact Manager" extension of the "Google Chrome Web Browser"

  • This all needs to be done automatically by some kind of script that can run in the background while I'm working on other stuff.*

How can it be done??

Something I'd imagine I need is multiple virtual clip-boards... but what else?

share|improve this question
up vote 2 down vote accepted

If you can do it by hand, you can easily automate it using macro software. My weapon of choice is AutoHotkey, specifically AutoHotkey_L.


Based on your example, the following will be useful:

For example, the logic of your script may look like this*:
*There may be minor errors, but you get the gist!

;Note: find Control and Window names using AutoIt3 Window Spy

Name := []
Email := []

members = 100

while (members > 0)
    Clipboard = 
    ControlSend, MemberExtrControl, ^a^c, MemberExtrWindow

    Clipboard = 
    ControlSend, MemberExtrControl, Tab^a^c, MemberExtrWindow



index = 1

Loop % Names.MaxIndex()
    name := Name.Remove(index)
    email := Email.Remove(index)

    ControlSend, ContactMgrControl, %name%, ContactMgrWindow
    ControlSend, ContactMgrControl, Tab%email%, ContactMgrWindow


share|improve this answer
Will definitely take a look at this! I have to learn script syntax first though =| Thanks! – Griffin Feb 7 '12 at 7:29
Ok now that I've experimented and done some research; What makes you choose AHK over other automation tools such as AutoIt? I also have a background in C++, plan to learn Python, and would enjoy OS-independent scripts so I can share with others: So do you still suggest I continue to learn/use AHK? Consider this post:… – Griffin Feb 8 '12 at 7:13
Honestly, I have not tried AutoIt. I learned AHK years ago and stuck with it. – iglvzx Feb 8 '12 at 7:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .