日期:2014-05-20 浏览次数:20738 次
public static void main(String args) { try { Robot r = new Robot(); int waitTime = 5; //minutes boolean continued = true; while (continued) { //A (350, 150) r.mouseMove(350, 150); r.mousePress(InputEvent.BUTTON1_MASK); r.mouseRelease(InputEvent.BUTTON1_MASK); Thread.sleep(1000); //B (350, 180) r.mouseMove(350, 180); r.mousePress(InputEvent.BUTTON1_MASK); r.mouseRelease(InputEvent.BUTTON1_MASK); Thread.sleep(1000); //C 350, 200 r.mouseMove(350, 200); r.mousePress(InputEvent.BUTTON1_MASK); r.mouseRelease(InputEvent.BUTTON1_MASK); Thread.sleep( waitTime * 60000); } } catch (Exception e) { System.out.println("error :" + e); e.printStackTrace(); }