自动采集

wjdr
wangbing 1 year ago
parent af32fd67c4
commit e8d0b76cb0

@ -2,6 +2,7 @@
<project version="4">
<component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
<file url="PROJECT" charset="UTF-8" />
</component>
</project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

@ -312,7 +312,7 @@ public class JMacro {
// 进行全像素匹配
double similar = Imager.calcSimilar(x - xMin, y - yMin, pic.getHeight(), pic.getWidth(), screenData, picData);
if (similar >= minSimilar) {
return new ScreenRect(x - xMin, y - yMin, x + pic.getWidth(), y + pic.getHeight(), similar);
return new ScreenRect(x, y, x + pic.getWidth(), y + pic.getHeight(), similar);
}
}
}
@ -406,7 +406,7 @@ public class JMacro {
/**
*
*
* @param point
* @param point
* @param file
* @param minSimilar
* @return
@ -432,7 +432,7 @@ public class JMacro {
/**
*
*
* @param point
* @param point
* @param file
* @param minSimilar
* @return

@ -96,7 +96,7 @@ public class MainTask {
// 获取窗口返回
gameScreen = new ScreenRect();
gameScreen.setLeft(mumu.getLeft() - 428);
gameScreen.setTop(mumu.getTop() - 8);
gameScreen.setTop(mumu.getBottom() + 7);
gameScreen.setRight(mumu.getRight());
gameScreen.setBottom(mumu.getBottom() + 951);
Logger.info("应用窗口位置:" + gameScreen.toString());
@ -165,17 +165,15 @@ public class MainTask {
}
{ // 定位离线收益弹框,关闭弹框
BufferedImage image = Imager.load(new File("legend", "城镇_欢迎回来.png"));
ScreenRect rect = jMacro.findPic(gameScreen, image, 0.95d);
ScreenRect rect = jMacro.matchPic(new ScreenPoint(gameScreen.getLeft(),gameScreen.getTop()), new File("legend", "L204,734-城镇_离线收益.png"), 0.9);
if (rect != null) {
jMacro.mouseLeftClick(new ScreenPoint(rect.getCenter()[0], rect.getBottom()));
Logger.info("检测到欢迎回来弹框,关闭弹框");
jMacro.mouseLeftClick(rect);
Logger.info("检测到离线收益弹框,关闭弹框");
}
}
{ // 定位主程序
BufferedImage legend = Imager.load(new File("legend", "城镇_野外.png"));
ScreenRect rect = jMacro.findPic(gameScreen, legend, 0.90d);
ScreenRect rect = jMacro.matchPic(new ScreenPoint(gameScreen.getLeft(),gameScreen.getTop()), new File("legend", "L444,888-野外.png"), 0.9);
if (rect != null) {
Logger.info("程序主界面已就绪");
return rect;

Loading…
Cancel
Save

Powered by TurnKey Linux.