java mouse control
페이지 정보
작성자 조희승 댓글 0건 조회 4,577회 작성일 16-12-01 16:38본문
import java.awt.event.*;
import java.awt.Robot;
public class a {
public static void main(String args[]) {
Robot bot = null;
try {
bot = new Robot();
} catch (Exception failed) {
System.err.println("Failed instantiating Robot: " + failed);
}
int mask = InputEvent.BUTTON1_DOWN_MASK;
for (int i=0; i< 600; i++)
{
bot.mouseMove(910, 730);
bot.mousePress(mask);
bot.mouseRelease(mask);
try {
Thread.sleep(1*1000);
} catch (InterruptedException e) { }
bot.mouseMove(910, 730);
bot.mousePress(mask);
bot.mouseRelease(mask);
try {
Thread.sleep(1*1000);
} catch (InterruptedException e) { }
bot.mouseMove(550, 480);
bot.mousePress(mask);
bot.mouseRelease(mask);
try {
Thread.sleep(60*1000);
} catch (InterruptedException e) { }
System.out.println (i);
}
}
}
import java.awt.Robot;
public class a {
public static void main(String args[]) {
Robot bot = null;
try {
bot = new Robot();
} catch (Exception failed) {
System.err.println("Failed instantiating Robot: " + failed);
}
int mask = InputEvent.BUTTON1_DOWN_MASK;
for (int i=0; i< 600; i++)
{
bot.mouseMove(910, 730);
bot.mousePress(mask);
bot.mouseRelease(mask);
try {
Thread.sleep(1*1000);
} catch (InterruptedException e) { }
bot.mouseMove(910, 730);
bot.mousePress(mask);
bot.mouseRelease(mask);
try {
Thread.sleep(1*1000);
} catch (InterruptedException e) { }
bot.mouseMove(550, 480);
bot.mousePress(mask);
bot.mouseRelease(mask);
try {
Thread.sleep(60*1000);
} catch (InterruptedException e) { }
System.out.println (i);
}
}
}
댓글목록
등록된 댓글이 없습니다.