forked from Mister-Kin/AutojsScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchina-unicom.js
More file actions
29 lines (28 loc) · 843 Bytes
/
china-unicom.js
File metadata and controls
29 lines (28 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// ----------------------------
// 脚本信息设定
let task_name = "中国联通签到"
let app_name = "中国联通"
// ----------------------------
let common = require('common.js')
common.startLog(task_name)
common.runApp(app_name)
// ----------------------------
// 脚本自定义函数
dailySign()
// ----------------------------
common.stopApp(app_name)
common.endLog(task_name)
home()
exit()
function dailySign() {
let detect_sign_button = common.detectWidgetItem("id", "com.sinovatech.unicom.ui:id/home_qiandao_image", "none", "normal")
if (detect_sign_button) {
detect_sign_button.click()
if (common.detectSuccessInfo("textContains", "话费红包")) {
console.log("已完成「每日签到」")
}
}
else {
console.error("未检测到首页「签到」按钮")
}
}