function subscribe(){
//请求截图,用找图方法,第一个就要先写的请求截图代码,不然找图没法用
if (!requestScreenCapture()) {
toast("请求截图失败");
exit();
}
let 大图 = captureScreen() //大图就需截取手机屏幕。。意思就是截屏
let 小图 = images.read("/storage/emulated/0/Pictures/Screenshots/vvv.jpg"); //括号里是图片地址。。
let p = findImage(大图, 小图);
if (p) {
log("找到啦:" + "每日空投");
let xx = random(p.x, p.x + 小图.getWidth())
let yy = random(p.y, p.y + 小图.getHeight())
click(xx, yy)
log("一点击");
sleep(1000)
} else {
log("没找到" + "每日空投");
}
}
subscribe()
auto.js B0021 图片查找 订阅功能 2021-10-07
最新推荐文章于 2024-01-09 23:07:01 发布