Winform inter-communications between apps

I have a game app that has a window in it and was designed to be interacted with using only the keyboard. I find it very difficult to do this and was wondering if it was possible to write an app that would allow me to use the mouse on this first app to control it?

I'm thinking, if this is possible at all, that my small app would detect mouse clicks on the game app and feed into its keyboard buffer the keys it 'thinks' it is receiving from the keyboard.

Is this possible at all?

Thanks...
Are you talking about a virtual keyboard or parts of the app window representing specific keys?
Both of those are common problems and simple to implement.
The target app has buttons on it that only work when you arrow key the focus to it and then press Enter to execute that button function.

I'd like to use the mouse to just click on the button and have the target app respond accordingly.

That's what I'd like my small utility app to be able to do.

So, I guess I need to read up on identifying window apps that are running and I read about looping until the app title matches my string so I think I can identify the target game app.

But then I would need to mouse over the game app and detect what button (or control) I was over when I clicked the mouse. This I'm not sure how to do.

I'm not asking for any code, just a pointer where I can read up on what I need to do.

Thanks...

So instead of left mouse button you are currently using the Enter button.
Should be easy to fix. I'd like to avoid asking you questions about what you did, so could you just post your code here: http://pastebin.com/ , give me a link and I'll tell you what to add/change?
I don't have any code yet. The game app is Microsoft's Flight Simulator (FSX). There is a gauge panel that has some buttons on it that I want to be able to use my mouse to click on to operate. It's very difficult to press the keys to work this panel. Would be much easier to be able to mouse click on it. FSX is a windows app.

I hope this makes things clearer.

Thank you...
In the code below I'm looping through the notepad processes and when I find it or find one, I grab the handle.

My ShowWindow() errors. I'd like to control (at this starting out point anyway) showing, hiding the notepad window, bringing it to the front, etc.

I need some help with the ShowWindow line.

Thanks...

System.Diagnostics.Process[] ieProcs = Process.GetProcessesByName("NOTEPAD");
if (ieProcs.Length > 0)
{
foreach (System.Diagnostics.Process p in ieProcs)
{
this.Text = p.ProcessName;
IntPtr i = p.MainWindowHandle;
// 0 hide
// 1 show
ShowWindow(i, 1); // syntax err here
}
}
So you are trying to get events from a window outside your app? I ever did this before so I can't help, sry.
Topic archived. No new replies allowed.