java 鼠标键盘监听、宏录制
如果我没看错的话,鼠标和键盘侦听器旨在捕获应用程序内的移动。我想做的是捕捉整个系统的运动。 鼠标移动/点击和按钮按下。
理想情况下,我想要一种捕获此运动并能够通过向机器人类传递适当的命令来重放它的方式。这看起来合理吗,还是我的做法是错误的?
If i read correctly, the mouse and keyboard listeners are intended to capture movement within an application. what I want to do is capture movement system wide.
Mouse movement/clicks and button presses.
Ideally i would like a manner of capturing this movement and being able to replay it by passing appropriate commands to the robot class. Does this seem reasonable, or am i going about this all wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您创建透明的全屏窗口并捕获其上的事件,这是可能的。
要重播事件,请使用 java.awt.Robot 类。
使用此资源了解如何创建透明窗口的更多信息:
http://java.sun.com/developer/technicalArticles/GUI/translucent_shape_windows/
It is possible if you create transparent full screen window and capture events on it.
To replay the events use class java.awt.Robot.
Use this resource for more info how to create transparent window:
http://java.sun.com/developer/technicalArticles/GUI/translucent_shaped_windows/