• 基于autojs的手机钉钉健康打卡脚本 免root


    原创脚本,转载请注明出处!!

    //获取当前脚本的id
    var current_e_id = engines.myEngine().id;
    setTimeout(function() {
        //根据当前脚本id,获取当前脚本
        let to_terminate_e = engines.all().filter(e => current_e_id === e.id)[0];
        //    console.log("都结束了!!");
        setTimeout(function() {
            to_terminate_e.forceStop(); //结束当前脚本
        }, 2000);
    }, 35000);
    
    //判断屏幕是否亮屏,若未亮则解锁
    if (!device.isScreenOn()) {
        let mima = "1234"; //密码
        let mmArr = mima.replace(/(.)(?=[^$])/g, "$1,").split(","); //字符串转字符数组
        device.wakeUp();
        setTimeout(function() {
            //console.show();
            swipe(device.width * 0.6, device.height * 0.78, device.width * 0.6, device.height * 0.3, 500);
        }, 1500);
        setTimeout(function() {
            for (let i = 0; i < mmArr.length; i++) {
                let m2 = text(mmArr[i]).findOne();
                sleep(100);
                click(m2.bounds().centerX(), m2.bounds().centerY());
            }
            sleep(800);
    app.launchApp("Auto.js"); dddk(); },
    3000); } else { dddk(); } function dddk() { var zxc = threads.start(function() { // console.log("我们开始吧!!!"); app.launchApp("钉钉"); let arrLC = ["home_bottom_tab_button_work", "员工健康", "今天", "获取", "提交"];//先判断流程,不同学校的控件文字或许有所不同,一般是"员工健康",若不同改为对应学校的text即可 let theClick = ""; //获取控件 for (let i = 0; i < arrLC.length; i++) { if(i == 0){ theClick = id(arrLC[i]).findOne(); //获取控件 }else if(i == arrLC.length - 1){//此处不同学校的打卡流程可能不同,此处为先获取位置再下滑。若是先下滑再获取位置,则改为,arrLC.length - 2即可 sleep(1000); for (let i = 0; i < 6; i++) { swipe(device.width * 0.8, device.height * 0.75, device.width * 0.8, device.height * 0.043, 150); //滚动 } theClick = text(arrLC[i]).findOne(); //获取控件 }else{ theClick = text(arrLC[i]).findOne(); //获取控件 } sleep(500);//防止刷新延迟过程中出现未刷新完成的控件 click(theClick.bounds().centerX(), theClick.bounds().centerY()); //点击sias } }); }
  • 相关阅读:
    搜索进阶1、八数码(HDU1043)
    D.迷宫2 (BFS+优先队列)
    小H的询问(线段树)
    B.迷宫(BFS)
    【UVA】10935 Throwing cards away I(STL队列)
    【UVA】10391 Compound Words(STL map)
    【UVA】12100 Printer Queue(STL队列&优先队列)
    【UVA】1596 Bug Hunt(模拟)
    【UVA】201 Squares(模拟)
    【UVA】1595 Symmetry(模拟)
  • 原文地址:https://www.cnblogs.com/yzyBalance/p/14275273.html
Copyright © 2020-2023  润新知