开发者

What application has mouse control?

开发者 https://www.devze.com 2023-01-13 16:01 出处:网络
One way user开发者_JS百科s 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

One way user开发者_JS百科s 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!


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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消