影粉世家app脚本代码
用autojs编写
~~
供参考而已
//影粉世界脚本
function 影粉世家腳本() {
launchApp("影粉世家极速版");
console.log("打开影粉极速")
text("任务中心").waitFor();
console.log("进入首页")
sleep(2000)
if (text("任务中心").findOnce()) {
text("任务中心").findOnce().parent().click()
console.log("任务中心")
sleep(1000)
}
text("任务列表").waitFor()
sleep(3000)
var 任务数量 = className("android.widget.ImageView").depth(25).drawingOrder(1).indexInParent(0).find()
log(任务数量.length)
任务数量.forEach(function (weizhi, index) {
//var weizhi1=weizhi.bounds()
//press(weizhi1.centerX(),weizhi1.centerY(),1)
任务数量[index].parent().click()
console.log("看任务广告" + (index + 1))
sleep(3000)
while (true) {
let 影粉广告关闭 = className("android.widget.ImageView").depth(5).drawingOrder(2).indexInParent(1).findOnce();
if (影粉广告关闭) {
sleep(3000)
影粉广告关闭.click()
console.log("关闭广告")
sleep(1000)
}
if (id("tt_video_ad_close_layout").findOnce()) {
id("tt_video_ad_close_layout").findOnce().click();
console.log("关闭广告")
sleep(1000)
}
if (text("确定").findOnce()) {
text("确定").findOnce().parent().click()
sleep(1000)
break;
}
}
})
if (任务数量 == 0) {
console.log("任务完成,脚本即将停止")
sleep(3000)
}
}
版权声明:本文为weixin_46460150原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。