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.
我目前有一个简单的应用程序,需要单击某些坐标,并且在不使用计算机时它与 Java 机器人完美结合。
但是,当用户用鼠标四处移动时,算法有时会失败并错过坐标。有没有办法验证鼠标点击或锁定物理鼠标/键盘输入几毫秒,直到 Java 机器人完成它的工作?
根据 Arne 的要求,我将发表我的评论作为答案。
您可以使用 JNA 连接鼠标或键盘,这是一个示例。