Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 C++ 中模拟鼠标单击/按键?当我运行程序时,我希望它单击鼠标左键并按“A”。谢谢!(我正在为 MacOSX 制作这个程序)
我没有为 OSX 做任何编程,但我认为这就是你要找的:
https://developer.apple.com/library/mac/#documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html
特别是 CGEventPost