一、场景
想摸鱼的时候可以看看
二、代码
@Test public void wzwMouseMove() throws AWTException { System.out.println("开始"); while (true) { Robot r = new Robot(); if (a == 1) { r.mouseMove(376, 284); r.mousePress(InputEvent.BUTTON1_MASK); r.mouseRelease(InputEvent.BUTTON1_MASK); a = 0; } else { r.mouseMove(725, 281); r.mousePress(InputEvent.BUTTON1_MASK); r.mouseRelease(InputEvent.BUTTON1_MASK); a = 1; } try { // 多久一次(1分钟) Thread.sleep(60 * 1000); } catch (InterruptedException e) { e.printStackTrace(); } } }
标签:鼠标,MASK,Robot,InputEvent,mouseMove,神器,BUTTON1,摸鱼 From: https://www.cnblogs.com/saoge/p/16592350.html