3 Star 0 Fork 0

asst_tech/gdt_hb

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ASE.js 1.89 KB
一键复制 编辑 原始数据 按行查看 历史
落尘 提交于 2020-11-08 01:41 . 脚本修改,为测试兼容utils.js
auto.waitFor()
if (files.cwd().endsWith("脚本")) {
let _require = require;
require = function (path) {
if (path.startsWith("./")) {
path = path.replace("./", "");
}
path = files.cwd() + "/gdt_hb/" + path;
return _require(path);
}
}
var utils = require("./utils.js");
var storage = storages.create("xiangxiangyuedu");
var time = random(2000, 3000)
function launchAppEnhance(app_name) {
let thread = threads.start(function () {
toastLog("检查是否有打开权限!")
while (true) {
var allow = text("允许").findOne(5000)
if (allow) {
sleep(1000)
toastLog("发现允许授权!")
allow.click()
sleep(1000)
thread.interrupt()
break
}
}
})
sleep(1000)
var result = launchApp(app_name)
sleep(3000)
thread.interrupt()
return result
}
function task() {
// var notice = id("notice_delete").findOne(2000);
// if(notice){
// notice.click();
// }else{
// log('没有通知');
// }
harvest();
}
function harvest(){
var = text("").findOne(2000);
if(){
// 点击控件(收)
.click();
sleep(2000);
}
else{
toastLog('未找到收按钮');
log('未找到收按钮')
}
}
// 点击控件坐标,控件的clickbale为false的时候
function 点击控件(x) {
var weight = x.bounds()
click(weight.centerX(), weight.centerY())
}
function main() {
let open_app = launchAppEnhance("ASE");
if (open_app) {
task()
}
else {
toastLog("ASE打开失败,请确认是否安装并授权打开!");
}
}
try {
main();
utils.updateAppProgress(100);
} catch (error) {
toastLog(error);
}
storage.put("script_running_status", "end");
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/asst_tech/gdt_hb.git
git@gitee.com:asst_tech/gdt_hb.git
asst_tech
gdt_hb
gdt_hb
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385