How to record mouse events on other objects?
Dear all,
Assume we have 3 buttons from an application: A, B, and C.
Now I want to record the mouse events on the buttons using another application. For example, if the user clicked button A first, then C, then B, the application should give us a report like the following:
clicked A
clicked C
clicked B
!!!NOTE: The requirement is that you cannot alter the code of the buttons because it was developed by someone else.
This problem bothered me a lot and I still cannot find a way to do it.
Could someone help me?
Thanks in advance!
Re: How to record mouse events on other objects?
Well monitoring events of another application can prove tricky.
Microsoft Research has a cool utility called detours. That lets you hook into another process. Using this you could do what you want.
But you should know c++ pretty well if your going to try this, other than that its pretty straight forward.
Here's the official site. http://research.microsoft.com/sn/detours/
If you go this route and get stuck just post a reply I'll be glad to try and help.
Re: How to record mouse events on other objects?
Quote:
Originally Posted by compavalanche
Microsoft Research has a cool utility called detours.
Irrelevant.
Api hooking has nothing to do with message hooking, which is the right method.
Re: How to record mouse events on other objects?
Hi Fred, do you mind to elaborate more on the message hooking?
Thanks.
Re: How to record mouse events on other objects?
wm_ windows message hooking (mouse, keyboard, journalrecord...)
via what you describe, doesn't asyncread and asyncwrite work ?
I hear detours is old, and not necessarily work on all windows os
Re: How to record mouse events on other objects?
Quote:
Originally Posted by Voominibear
wm_ windows message hooking (mouse, keyboard, journalrecord...)
via what you describe, doesn't asyncread and asyncwrite work ?
No, it's impossible to do, hooking will work in this case.
Re: How to record mouse events on other objects?
Thanks for all the reply. Really appreciate it. For the message hooking, can you guys recommend me where can I learn more about it? Are there any good books or websites available where I can learn more about hooking?
Thanks.
kagohaik