views:

45

answers:

3

One way users can cheat with games (desktop or web) is by having "robots" monitor the screen and move the mouse for them. Is there a way (of course with transparency and user permission) to monitor if an application is controlling the mouse? I am primarily interested in a windows app, but if there is a way for other OS's that would be useful to know as well. Thanks!

A: 

There shouldn't be. Any sensibly designed UI layer will only pass events to the applications, about inputs such as mouse, keyboard etc. Those events will typically not include information about how the event was generated (you're not supposed to care, so why pay for that overhead).

One way might be to scan the system for processes having names of known "event-fakers", much like some anti-virus programs blacklist applications by name.

unwind
Yup, but name tracking can be easily beaten (just rename apps/processes). Even tracking which processes take up CPU time may not catch these apps...
coldfact
A: 

On Windows you can add a hook to monitor for injected keyboard or mouse messages,
and remove them if you like.

But I'm not sure if you can find the source of the messages.

Nick D
Interesting angle - will check out the link.
coldfact
A: 

Just an idea: Get the current mouse position and check for fast position changes. Like from (10,15) to (1000, 400). Most robots just set a new position and don't imitate the human mouse movement.

user411718
Agreed - usage profiling is one way to go, for sure, was just seeing if concrete evidence of another application controlling the mouse was available, as opposed to seeing if something looks robot like.
coldfact

related questions