上传备份

wjdr
王兵 1 year ago
parent a041f12ccf
commit 1861004185

@ -397,7 +397,7 @@ public abstract class JMacro {
int samePixels = 0;
for (int smallY = 0; smallY < pic.getHeight(); smallY++) {
for (int smallX = 0; smallX < pic.getWidth(); smallX++) {
if (ColorUtil.isSimilar(screenData[x + smallX][y + smallY], picData[smallX][smallY])) {
if (ColorUtil.isSimilar(screenData[x + smallX - xMin][y + smallY - yMin], picData[smallX][smallY])) {
samePixels++;
}
}

@ -69,12 +69,12 @@ public class JMainApplication extends Application {
JMainService.init(new JMacro() {
@Override
public ViewRect focus() {
return new ViewRect(0, 0, 200, 200);
return new ViewRect(0, 0, 1920, 1080);
}
@Override
public void run() {
ViewRect pic = matchLegend("回收站", 0.9);
ViewRect pic = matchLegend("xinxin", 0.9);
if (pic != null) {
mouseLeftDoubleClick(pic);
}

@ -117,8 +117,12 @@ public class JMainService {
ThreadUtil.sleep(1000);
macro.run();
} catch (Exception e) {
e.printStackTrace();
Logger.error("异常中断");
if ((e instanceof InterruptedException) || e.getMessage().contains(InterruptedException.class.getSimpleName())) {
// 服务停止
} else {
e.printStackTrace();
Logger.error("异常中断");
}
}
}
Logger.info("服务停止,守护线程已退出");

@ -89,7 +89,7 @@ public class Legend {
newLegend.file = file;
newLegend.name = name;
if (!name.matches("[\\S\\s]+#L[0-9]+,[0-9]+\\.png")) {
if (!file.getName().matches("[\\S\\s]+#L[0-9]+,[0-9]+\\.png")) {
newLegend.location = null;
} else {
int x = Convert.toInt(ReUtil.get("[\\S\\s]+#L([0-9]+),[0-9]+\\.png", file.getName(), 1), 0);

Loading…
Cancel
Save

Powered by TurnKey Linux.