How to Link Two External Application Together via data in their respective TextBoxes fields in C#?
I need to be able to link two External Applications together through their text boxes.
For the example, consider:

*Internet Explorer & Mozilla Firefox (these are arbitrary - not looking for their specific APIs. Assume the programs do not have any interfaces. We do not know what the actual programs will be)*

What we also know about the applications is that they will use standard windows text-input boxes, such as those I've mentioned above.

The goal is as follows:

 - User selects the textbox from where
   the data is gathered. User Selects
   the textbox TO where the data is
   being sent
   
   user types a word IE's search box and
   hits ENTER. This word shows up in
   Firefox's search box (with ENTER).

How Far I've Got:

1) Able to successfully implement a low level Mouse Hook.
Now we can track the mouse (this is to know where the user is selecting their box).
**Q1**: Now, using this low level mouse hook, how can our application *know* which control(textbox) the user has selected? 

If we can resolve above, we can set the FROM and TO by our application.
The rest can be done via a keyboard hook (capture messages).
two subsequent questions:
 **Q2**: How do we know which control is CURRENTLY active. (I believe if we can find a solution to Q1, this would be easier(?)
**Q3** How can we send the keys to the target text box. SendKeys method is OK - BUT it needs the other application to be focused. This is not optimal, but its possible to make it focused, however - how do you make the specific text box in focus (again, answering Q1 will probably lead me closer to this question too).


**Other Notes**:

a)
Able to get list of all processes by Process. This is so that the user can select the process they want manually without doing #1. However - as far as this gets me is the process - again - can't get to the actual sub-control

b) using NativeWin32 - I can get names of the child windows (that I need), but when I get to sub.child - i get a max of 10 results with a blank name. 


Any help or direction in this would be very appreciated. Killed my Sunday researching this :(.



How to Link Two External Application Together via data in their respective TextBoxes fields in C#?
===

I need to be able to link two External Applications together through their text boxes.
For the example, consider:

*Internet Explorer & Mozilla Firefox (these are arbitrary - not looking for their specific APIs. Assume the programs do not have any interfaces. We do not know what the actual programs will be)*

What we also know about the applications is that they will use standard windows text-input boxes, such as those I've mentioned above.

The goal is as follows:

 - User selects the textbox from where
   the data is gathered. User Selects
   the textbox TO where the data is
   being sent
   
   user types a word IE's search box and
   hits ENTER. This word shows up in
   Firefox's search box (with ENTER).

How Far I've Got:

1) Able to successfully implement a low level Mouse Hook.
Now we can track the mouse (this is to know where the user is selecting their box).
**Q1**: Now, using this low level mouse hook, how can our application *know* which control(textbox) the user has selected? 

If we can resolve above, we can set the FROM and TO by our application.
The rest can be done via a keyboard hook (capture messages).
two subsequent questions:
 **Q2**: How do we know which control is CURRENTLY active. (I believe if we can find a solution to Q1, this would be easier(?)
**Q3** How can we send the keys to the target text box. SendKeys method is OK - BUT it needs the other application to be focused. This is not optimal, but its possible to make it focused, however - how do you make the specific text box in focus (again, answering Q1 will probably lead me closer to this question too).


**Other Notes**:

a)
Able to get list of all processes by Process. This is so that the user can select the process they want manually without doing #1. However - as far as this gets me is the process - again - can't get to the actual sub-control

b) using NativeWin32 - I can get names of the child windows (that I need), but when I get to sub.child - i get a max of 10 results with a blank name. 


Any help or direction in this would be very appreciated. Killed my Sunday researching this :(.


