机器人AWT与JnativeHook库无法正常工作

发布于 2025-02-06 16:29:40 字数 161 浏览 2 评论 0原文

我正在尝试使用JnativeHook库创建一个自动点击器,以跟踪桌面上的按钮的点击。然后,我将接收到的坐标保存在地图中,并通过机器人AWT将光标移至设置坐标,但由于某种原因,它会不正确地移动。如果我按屏幕的开头(0,0),则坐标相同,我移动鼠标越远,坐标的差异就越大。也许有人知道用坐标纠正此错误的解决方案?

I'm trying to create an auto clicker using the JNativeHook library to track the click of a button on the desktop. Then I save the received coordinates in Map and by means of Robot awt I try to move the cursor to the set coordinates, but for some reason it moves incorrectly. If I press at the beginning of the screen (0, 0), the coordinates are the same and the further I move the mouse, the greater the difference in coordinates. Maybe someone knows the solution to correct this error with coordinates?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文