From 17aed222fb1250c9e99518327a29ec2c97918e48 Mon Sep 17 00:00:00 2001 From: e1399579 Date: Thu, 17 Aug 2023 09:54:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=84=9A=E6=9C=AC=E9=80=82=E9=85=8DAutoJs6?= =?UTF-8?q?=E3=80=81=E6=9B=B4=E6=96=B0Tasker=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E3=80=81=E6=9B=B4=E6=96=B0README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 14 +++++++++++--- Tasker.xml | 14 +++++++------- ...273\230\345\256\235\347\255\276\345\210\260.js" | 13 ++++++------- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 8522f3c..195f84d 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ ## 设备要求 1. 原生/类原生系统,Android 9.0+(需要开启无障碍服务) -2. 安装 [AutoX.js](https://github.com/kkevsekk1/AutoX/releases) -3. 安装Tasker 5.0+(可选) +2. 安装 [AutoJs6 by SuperMonster003](https://github.com/SuperMonster003/AutoJs6/releases) +3. 安装 Tasker 5.0+(可选) ## 目录结构 ``` @@ -26,6 +26,7 @@ * 用途:解锁屏幕 * 加载到其他脚本运行。也可单独使用,一般不用管 + ### 支付宝签到 * 用途:支付宝每日签到领积分 * 要求:主页有支付宝图标 @@ -35,4 +36,11 @@ * 要求:主页有京东图标 ### Tasker定时任务 -* 直接导入Tasker.xml,然后根据需求修改时间、脚本路径等 \ No newline at end of file +* 直接导入`Tasker.xml`,然后根据需求修改时间、脚本路径等 + +## 相关链接 +[AutoJs6 应用文档](https://docs.autojs6.com/) by [SuperMonster003](https://github.com/SuperMonster003) + +[AutoJs6 VSCode插件](http://vscext-project.autojs6.com) by [SuperMonster003](https://github.com/SuperMonster003) + +[蚂蚁森林脚本](https://github.com/SuperMonster003/Ant-Forest) by [SuperMonster003](https://github.com/SuperMonster003) diff --git a/Tasker.xml b/Tasker.xml index 8216fe7..5003b1c 100644 --- a/Tasker.xml +++ b/Tasker.xml @@ -14,7 +14,7 @@ 1668679485838 - 1687070791089 + 1687071013886 8 5 4 @@ -37,10 +37,10 @@ 1668622877039 - 1668680364587 + 1692234633655 2 支付宝签到 - 6 + 100 877 @@ -50,17 +50,17 @@ - org.autojs.autoxjs.v6 + org.autojs.autojs6 org.autojs.autojs.external.open.RunIntentActivity 1668622877039 - 1687070791089 + 1692234646284 4 京东签到 - 6 + 100 877 @@ -70,7 +70,7 @@ - org.autojs.autoxjs.v6 + org.autojs.autojs6 org.autojs.autojs.external.open.RunIntentActivity diff --git "a/\346\224\257\344\273\230\345\256\235\347\255\276\345\210\260.js" "b/\346\224\257\344\273\230\345\256\235\347\255\276\345\210\260.js" index 9f90e42..6605e16 100644 --- "a/\346\224\257\344\273\230\345\256\235\347\255\276\345\210\260.js" +++ "b/\346\224\257\344\273\230\345\256\235\347\255\276\345\210\260.js" @@ -38,19 +38,16 @@ sleep(500); let img = images.captureScreen(); let img2 = images.clip(img, 0, 0, 1080, 1200); toastLog("OCR开始"); -let list = paddle.ocr(img2); +let list = ocr.detect(img2); toastLog("OCR结束"); -img = null; -img2 = null; -images = null; -paddle = null; +img2.recycle(); let sign = []; let get_all = []; for (let obj of list) { - if (obj.text.indexOf("每日签到") !== -1) { + if (obj.label.indexOf("每日签到") !== -1) { sign = [obj.bounds.left, obj.bounds.top]; } - if (obj.text.indexOf("全部领取") !== -1) { + if (obj.label.indexOf("全部领取") !== -1) { get_all = [obj.bounds.left, obj.bounds.top]; } } @@ -63,6 +60,8 @@ if (sign.length > 0) { robot.click(sign[0], sign[1]); toastLog("签到成功"); sleep(3000); +} else { + toastLog("签到失败"); } // =====================控件查找start=====================