|
-
July 17th, 2008, 02:08 PM
#1
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!
Last edited by kagohaik; April 3rd, 2009 at 02:01 PM.
-
July 17th, 2008, 03:28 PM
#2
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.
-
July 17th, 2008, 11:52 PM
#3
Re: How to record mouse events on other objects?
 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.
-
July 18th, 2008, 01:39 PM
#4
Re: How to record mouse events on other objects?
Hi Fred, do you mind to elaborate more on the message hooking?
Thanks.
-
July 18th, 2008, 09:43 PM
#5
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
-
July 18th, 2008, 09:49 PM
#6
Re: How to record mouse events on other objects?
 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.
-
July 21st, 2008, 04:49 PM
#7
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|