function subscribe() {
//请求截图,用找图方法,第一个就要先写的请求截图代码,不然找图没法用
if (!requestScreenCapture()) {
toast("请求截图失败");
exit();
}
// let img1 = captureScreen("/storage/emulated/0/脚本/sss.jpg") //大图就需截取手机屏幕。。意思就是截屏
// let img2 = images.read("/storage/emulated/0/脚本/vvv.jpg"); //括号里是图片地址。。
var img = captureScreen();
var templ=images.read("/sdcard/脚本/vvv.jpg")
var p = findImage(img, templ);
// if (p) {
// toastLog("找到啦:" + p);
// } else {
// toast("没找到");
// }
if (p) {
toastLog("找到啦:" + p);
let xx = random(p.x, p.x + templ.getWidth())
let yy = random(p.y, p.y + templ.getHeight())
click(xx, yy)
log("一点击");
sleep(1000)
} else {
log("没找到" + "每日空投");
}
}
subscribe()
auto.ja 部落冲突01 找图并点击
最新推荐文章于 2023-08-09 13:13:34 发布