Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
pzx521521 authored Oct 19, 2023
1 parent cdf77a6 commit 429a9cb
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,16 @@ function MyClick(str){
var meButton = text(str).findOnce()
if (meButton != undefined){
meButton = meButton.parent();
if(!meButton.clickable()){
meButton = meButton.parent();
}
toastLog("找到了" + str)
toastLog(meButton.clickable())
meButton.click()
}
return true
}else{
return false
}
}

function ExprClick(str){
Expand Down Expand Up @@ -101,22 +108,22 @@ function LookAd(){
CloseAd("后3次的第"+index+ "次")
}
}

home()

sleep(1000)
if (launchApp("起点读书")){
toastLog("启动起点读书成功")
sleep(3000)
MyClick("我")
sleep(1500)
if (MyClick("我知道了")){
sleep(1500)
}
MyClick("福利中心")
sleep(1500)
LookAd()
}else{
toastLog("启动起点读书失败")
}
sleep(3000)

MyClick("我")
sleep(1500)
MyClick("福利中心")
sleep(500)
ExprClick("青少年")
sleep(1500)
LookAd()



0 comments on commit 429a9cb

Please sign in to comment.