How to simulate a real mouse click using java?

前端 未结 6 1621
清酒与你
清酒与你 2020-11-27 14:44

I\'m attempting to perform a mouse click in Java, to click something in an external program. To do this, I\'m using java.awt.robot, and the following code:

6条回答
  •  借酒劲吻你
    2020-11-27 15:42

    Some applications may detect click source at low OS level. If you really need that kind of hack, you may just run target app in virtual machine's window, and run cliker in host OS, it can help.

提交回复
热议问题