Skip to content

Commit 17aed22

Browse files
committed
脚本适配AutoJs6、更新Tasker配置文件、更新README.md
1 parent a921f22 commit 17aed22

File tree

3 files changed

+24
-17
lines changed

3 files changed

+24
-17
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
## 设备要求
55
1. 原生/类原生系统,Android 9.0+(需要开启无障碍服务)
6-
2. 安装 [AutoX.js](https://github.com/kkevsekk1/AutoX/releases)
7-
3. 安装Tasker 5.0+(可选)
6+
2. 安装 [AutoJs6 by SuperMonster003](https://github.com/SuperMonster003/AutoJs6/releases)
7+
3. 安装 Tasker 5.0+(可选)
88

99
## 目录结构
1010
```
@@ -26,6 +26,7 @@
2626
* 用途:解锁屏幕
2727
* 加载到其他脚本运行。也可单独使用,一般不用管
2828

29+
2930
### 支付宝签到
3031
* 用途:支付宝每日签到领积分
3132
* 要求:主页有支付宝图标
@@ -35,4 +36,11 @@
3536
* 要求:主页有京东图标
3637

3738
### Tasker定时任务
38-
* 直接导入Tasker.xml,然后根据需求修改时间、脚本路径等
39+
* 直接导入`Tasker.xml`,然后根据需求修改时间、脚本路径等
40+
41+
## 相关链接
42+
[AutoJs6 应用文档](https://docs.autojs6.com/) by [SuperMonster003](https://github.com/SuperMonster003)
43+
44+
[AutoJs6 VSCode插件](http://vscext-project.autojs6.com) by [SuperMonster003](https://github.com/SuperMonster003)
45+
46+
[蚂蚁森林脚本](https://github.com/SuperMonster003/Ant-Forest) by [SuperMonster003](https://github.com/SuperMonster003)

Tasker.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</Profile>
1515
<Profile sr="prof5" ve="2">
1616
<cdate>1668679485838</cdate>
17-
<edate>1687070791089</edate>
17+
<edate>1687071013886</edate>
1818
<flags>8</flags>
1919
<id>5</id>
2020
<mid0>4</mid0>
@@ -37,10 +37,10 @@
3737
</Project>
3838
<Task sr="task2">
3939
<cdate>1668622877039</cdate>
40-
<edate>1668680364587</edate>
40+
<edate>1692234633655</edate>
4141
<id>2</id>
4242
<nme>支付宝签到</nme>
43-
<pri>6</pri>
43+
<pri>100</pri>
4444
<Action sr="act0" ve="7">
4545
<code>877</code>
4646
<Str sr="arg0" ve="3"/>
@@ -50,17 +50,17 @@
5050
<Str sr="arg4" ve="3"/>
5151
<Str sr="arg5" ve="3"/>
5252
<Str sr="arg6" ve="3"/>
53-
<Str sr="arg7" ve="3">org.autojs.autoxjs.v6</Str>
53+
<Str sr="arg7" ve="3">org.autojs.autojs6</Str>
5454
<Str sr="arg8" ve="3">org.autojs.autojs.external.open.RunIntentActivity</Str>
5555
<Int sr="arg9" val="1"/>
5656
</Action>
5757
</Task>
5858
<Task sr="task4">
5959
<cdate>1668622877039</cdate>
60-
<edate>1687070791089</edate>
60+
<edate>1692234646284</edate>
6161
<id>4</id>
6262
<nme>京东签到</nme>
63-
<pri>6</pri>
63+
<pri>100</pri>
6464
<Action sr="act0" ve="7">
6565
<code>877</code>
6666
<Str sr="arg0" ve="3"/>
@@ -70,7 +70,7 @@
7070
<Str sr="arg4" ve="3"/>
7171
<Str sr="arg5" ve="3"/>
7272
<Str sr="arg6" ve="3"/>
73-
<Str sr="arg7" ve="3">org.autojs.autoxjs.v6</Str>
73+
<Str sr="arg7" ve="3">org.autojs.autojs6</Str>
7474
<Str sr="arg8" ve="3">org.autojs.autojs.external.open.RunIntentActivity</Str>
7575
<Int sr="arg9" val="1"/>
7676
</Action>

支付宝签到.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,16 @@ sleep(500);
3838
let img = images.captureScreen();
3939
let img2 = images.clip(img, 0, 0, 1080, 1200);
4040
toastLog("OCR开始");
41-
let list = paddle.ocr(img2);
41+
let list = ocr.detect(img2);
4242
toastLog("OCR结束");
43-
img = null;
44-
img2 = null;
45-
images = null;
46-
paddle = null;
43+
img2.recycle();
4744
let sign = [];
4845
let get_all = [];
4946
for (let obj of list) {
50-
if (obj.text.indexOf("每日签到") !== -1) {
47+
if (obj.label.indexOf("每日签到") !== -1) {
5148
sign = [obj.bounds.left, obj.bounds.top];
5249
}
53-
if (obj.text.indexOf("全部领取") !== -1) {
50+
if (obj.label.indexOf("全部领取") !== -1) {
5451
get_all = [obj.bounds.left, obj.bounds.top];
5552
}
5653
}
@@ -63,6 +60,8 @@ if (sign.length > 0) {
6360
robot.click(sign[0], sign[1]);
6461
toastLog("签到成功");
6562
sleep(3000);
63+
} else {
64+
toastLog("签到失败");
6665
}
6766

6867
// =====================控件查找start=====================

0 commit comments

Comments
 (0)