Hello!
I'm looking for suggestions as to how to capture events such as a button click or menu selection from an application
not written in PB. I don't have the source code for this program.
I've written a simple timer program in PB and I want to do some performance tests on the other program,
timing how long certain operations take. I tried to search the forum, but couldn't get any useful results.
Is there a way to select a button or menu item in the target program and be able to capture when it is clicked?
Thanks,
Eric
Capture Events from Another (Not PB) Program
- netmaestro
- PureBasic Bullfrog

- Posts: 8453
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: Capture Events from Another (Not PB) Program
On Windows you'd use a WH_CALLWNDPROC or WH_CALLWNDPROCRET hook for that. The first catches the events just before they are processed and the second just after.
There's an example here: http://www.purebasic.fr/english/viewtop ... 90&start=2
There's an example here: http://www.purebasic.fr/english/viewtop ... 90&start=2
BERESHEIT
Re: Capture Events from Another (Not PB) Program
netmaestro,
Thanks for your suggestion and the example.
I see how the window paint messages were captured,
but I'm having a problem figuring out how to apply the
technique to a button or menu click.
Is there an example of this?
Regards,
Eric
Thanks for your suggestion and the example.
I see how the window paint messages were captured,
but I'm having a problem figuring out how to apply the
technique to a button or menu click.
Is there an example of this?
Regards,
Eric
