|
|
@ -2,6 +2,9 @@ package xyz.wbsite.jmacro;
|
|
|
|
|
|
|
|
|
|
|
|
import java.awt.*;
|
|
|
|
import java.awt.*;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 重写系统Robot类的部分方法
|
|
|
|
|
|
|
|
*/
|
|
|
|
public class JRoot extends Robot {
|
|
|
|
public class JRoot extends Robot {
|
|
|
|
|
|
|
|
|
|
|
|
private static final int MAX_DELAY = 60000;
|
|
|
|
private static final int MAX_DELAY = 60000;
|
|
|
@ -13,6 +16,11 @@ public class JRoot extends Robot {
|
|
|
|
super(screen);
|
|
|
|
super(screen);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 需要主动将线程中断异常抛出去
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param ms 毫秒
|
|
|
|
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public synchronized void delay(int ms) {
|
|
|
|
public synchronized void delay(int ms) {
|
|
|
|
checkDelayArgument(ms);
|
|
|
|
checkDelayArgument(ms);
|
|
|
|