Yes I have the mouse coordinates.
What I am working on is a tool, that records the steps that a user takes
through an application. The purpose is for application testing and experience
metrics. This particular module is an application recorder.
What I am trying to do is let the user press a start recording button and
then record their actions and generate script to repeat them. What I need to
be able to acheive on a mouse click is determine the current process and then
attach to it like a debugger does. Any help you can provide there would be
appreciated... I am an advanced programmer. C, C++, C#, VB. 15+ years... so I
good with advanced examples. I would prefer to be able to do this with
managed code.
From that point, other code I have created will do the recording. It
currently askes the user to specify the application and then loads and
executes it...
So I am really just trying to auto detect the application to record... which
could be the desktop.

Signature
Bill
> > Thanks Moty,
> >
[quoted text clipped - 54 lines]
> Cheers,
> Moty
Moty Michaely - 11 Jun 2007 19:30 GMT
> Yes I have the mouse coordinates.
>
[quoted text clipped - 78 lines]
> > Cheers,
> > Moty
Hi,
If you ask to record the mouse events, and would like to restrict the
events to a specific application/s, you should filter the messages
that are relevant to the restricted applications. In that case, you
should *ask* in which application the event occured, meaning under
what window was the mouse at the time the event occured (otherwise, I
can't see any other binding mechanism of a mouse event and an
application).
After getting the window handle, you can get the process ID of the
window by calling GetWindowThreadProcessId:
http://msdn2.microsoft.com/en-us/library/ms633522.aspx
To be able to allow the user to select the application, you should
enumerate the running processes and save the selection's process ID:
System.Diagnostics.Process.GetProcesses();
Hope this helps.
Feel free to ask any further questions.
Cheers and good luck!
Moty