Is there a .NET library for sending keystrokes, mouse clicks, mouse movements and other input? Similar to AutoHotKey but for .NET library use?

假装没事ソ 提交于 2019-12-08 02:27:43

问题


I'm looking to essentially write code similar to what I can do with AutoHotKey, only in .NET and C#, because it's a much more robust environment. I didn't know if there was a wrapper library available for these sorts of hooks or not.

Does anyone know of a library that does this for .NET?


回答1:


This actually looks pretty promising, I haven't tested it yet, but it's at least a good starting point. Not too bad considering it's on CodeProject. lol.




回答2:


For sending keys you can use System.Windows.Forms.SendKeys.

For mouse and other input you have to wrap the SendMessage API.



来源:https://stackoverflow.com/questions/4809001/is-there-a-net-library-for-sending-keystrokes-mouse-clicks-mouse-movements-an

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!