ResVic
ResVic

Reputation: 117

How to monitor different events in 3rd party applications

I am developing a C# application. I am looking for a way to monitor different events in 3rd party applications.

Example 1: Calculator is running, and I want to know when the user has clicked on "=" button. Example 2: Skype is running and I want to monitor when the user hits the "Call" button. Example 3: Word is running and I want to monitor when the user opens the "Font" drop down list.

I am not looking for simple Mouse or Keyboard events.

Upvotes: 0

Views: 467

Answers (2)

madrang
madrang

Reputation: 824

Take a look at EventSpy, Both of those seams to do what you need.

http://www.codeproject.com/Articles/11918/EventSpy

http://eventspy.codeplex.com/

Upvotes: 1

Wonderbird
Wonderbird

Reputation: 374

You basically need to tap into the "Windows Messaging" loop. In order to properly filter the GAZILLION messages that come flying through you'll also need to be able to periodically scan through all of the active windows to see which ones (if any) are relevant to you. Be aware that this whole subsystem of windows is a GIANT security hole. (I have not worked with it much since NT4 / W95/W98 days so they might have tried attempts to "secure" it since then so it might be even harder to get to than it used to be. You're going to need a good ide / 3rd party tools to help you get started on your way to have some idea of what you're looking for.

In a "previous" life we used this basic technique to get ~4,000 workstations to install their own software, updates, patches, etc through monitoring for existence of certain windows, controls, etc and "injecting" messages into the Windows Messaging loop to control Application Setup Programs, configuration changes that were not stored in the registry, etc, etc...

Upvotes: 0

Related Questions