Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
bug fixes
  • Loading branch information
e1399579 committed Apr 17, 2018
1 parent d64f7a7 commit bc3a7d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 欢迎使用和提交bug反馈

## 设备要求:
1. 免ROOT权限(与Tasker结合使用) 或 ROOT权限(与Edge或Tasker结合使用)
1. 免ROOT权限(安卓7.0以上,与Tasker结合使用) 或 ROOT权限(安卓5.0以上,与Edge或Tasker结合使用)
2. 安卓5.0或更高版本(需要开启无障碍服务)
3. Auto.js软件3.1.1 Alpha 5或更高版本

Expand Down
6 changes: 4 additions & 2 deletions 蚂蚁森林.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var options = Object.assign({
// 所有操作都是竖屏
const WIDTH = Math.min(device.width, device.height);
const HEIGHT = Math.max(device.width, device.height);
const IS_ROOT = files.exists("/system/xbin/su") || files.exists("/system/bin/su");
const IS_ROOT = files.exists("/sbin/su") || files.exists("/system/xbin/su") || files.exists("/system/bin/su");

setScreenMetrics(WIDTH, HEIGHT);
start(options);
Expand Down Expand Up @@ -176,6 +176,7 @@ function AntForest(robot, options) {
} else {
times++;
this.back();
sleep(1500);
this.openApp();
}
} while (times < this.options.max_retry_times);
Expand Down Expand Up @@ -449,8 +450,9 @@ function AntForest(robot, options) {
log("点击->" + filters[i].contentDescription + ", " + filters[i].bounds());
sleep(100);
}

// 误点了按钮则返回
sleep(1000);
if (id("com.alipay.mobile.ui:id/title_bar_title").exists()) {
this.back();
sleep(1500);
Expand Down

0 comments on commit bc3a7d1

Please sign in to comment.