Comments (14)
看下你的脚本,第275行是什么?
from dingding-automatic-clock-in.
应该是这部分代码出错了, btn_sure.click() // 找到 "确定" 按钮,并点击 这句257,会不会是 BUNDLE_ID_DD 包名的问题啊?钉钉版本 V6.0.5
from dingding-automatic-clock-in.
钉钉软件没有调用出来,每次接收到短信解锁后,就进入到这个界面不动了
from dingding-automatic-clock-in.
有两个问题
1、同时运行了多个脚本。修改脚本之后,记得先在VS Code里按Shift+F5,停止运行脚本;或者在AutoJs里把正在运行的脚本关掉。不然会有很多个进程,而且报错的位置不对,很难定位问题。
2、能打开钉钉的设置界面,说明BUNDLE_ID是正确的,报错的原因可能是没有找到结束运行这个控件,或是点击了结束运行控件但没有找到确认按钮。你先把
let btn_finish = textMatches(/(.*结束.*)|(.*停止.*)|(.*运行.*)/).clickable(true).findOne()
改为:
let btn_finish = textMatches("结束运行").clickable(true).findOne()
或者
let btn_finish = descMatches("结束运行").clickable(true).findOne()
试一下
from dingding-automatic-clock-in.
替换这个方法在尝试一下,如果还有报错的话再把报错截图和相关代码块发一下
/**
* @description 结束钉钉进程
*/
function stopApp() {
console.log("结束钉钉进程")
// Root
// shell('am force-stop ' + BUNDLE_ID_DD, true)
// No Root
app.openAppSetting(BUNDLE_ID_DD)
let btn_finish = textMatches(/(.*结束.*)|(.*停止.*)/).clickable(true).findOne() // 直到找到 "结束运行" 按钮,并点击
if (btn_finish.enabled()) {
btn_finish.click()
console.log("点击了结束按钮")
if (null != textMatches("确定").clickable(true).findOne(1000)) { // 点击弹出的对话框中的 "确定" 按钮
btn_sure = textMatches("确定").clickable(true).findOnce()
btn_sure.click()
console.log("点击了确定按钮")
}
if (null != descMatches("确定").clickable(true).findOne(1000)) {
btn_sure = descMatches("确定").clickable(true).findOnce()
btn_sure.click()
console.log("点击了确定按钮")
}
console.info(app.getAppName(BUNDLE_ID_DD) + "已被关闭")
}
else {
console.info(app.getAppName(BUNDLE_ID_DD) + "未在运行")
}
sleep(1000)
home()
sleep(1000)
}
from dingding-automatic-clock-in.
现在不会报错,但是应该出现跟第一个同样的问题 《小米获取不到控件名称或者ID #14》 ,一直卡在那个应用详情界面。
from dingding-automatic-clock-in.
代码已更新,移除了 结束钉钉 这个过程
from dingding-automatic-clock-in.
经过一天的努力,终于可以调出打卡界面,但问题如下: 1.手机在熄屏情况下,无法正常解锁,手机常亮才行。
2:进入打卡界面,不会点击 下班打卡,上班打卡按钮。(一直卡在打卡界面中)
from dingding-automatic-clock-in.
https://github.com/georgehuan1994/DingDing-Automatic-Clock-in#%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9
按注意事项里的说明操作一下,看看是否能解决你的问题。
另外你说的无法正常解锁,是指无法点亮屏幕?还是上滑动作无法解锁屏幕?
卡在打卡界面这个问题,可以看看日志,如果是卡在“等待连接到考勤机”,请在脚本开头的常量中修改考勤机名称
from dingding-automatic-clock-in.
无上滑,解锁操作,现在可以点击打卡了。只是不能,熄屏解锁。
from dingding-automatic-clock-in.
swipe(360, 600, 360, 0, 100)
把解锁方法中的上滑动作改为这个试试
from dingding-automatic-clock-in.
打开那些都成功了。
from dingding-automatic-clock-in.
gesture(320, [device.width * 0.5, device.height * 0.7], [device.width * 0.5, device.height * 0.2])
gesture(320, [0, 0], [500, 1000])
为模拟一个从(0, 0)到(500, 1000)的手势操作,时长为320毫秒
根据平时的上滑位置来校正参数吧,device.width * 0.5
这个可以不动,主要调整Y轴的滑动区间
from dingding-automatic-clock-in.
设备解锁后,是不是也看不到,手机跳转到钉钉界面的啊?我看日记,是有解锁成功的,钉钉也正常的调用起来。但是看手机界面却还是锁屏界面.
from dingding-automatic-clock-in.
Related Issues (20)
- 打卡页面需要刷新 HOT 1
- 增加外勤打卡功能
- 查询功能回复undefined HOT 3
- 想请教下作者是否可以集成安卓4位数字解锁和钉钉极速打卡的功能 HOT 1
- 请问脚本停在“正在进入考勤界面”是什么原因
- 无法自动登录 HOT 6
- CorpId获取方式失效了,扫码提示让下载apk HOT 1
- 能点亮屏幕,但是无法进入桌面,这个是什么问题oppo A7x HOT 4
- Tasker不稳定,有替换方案吗? HOT 2
- 钉钉打卡成功若没有消息通知,怎么获取打卡结果 HOT 2
- run 无法识别设备
- autojs 4.1.1 提升版本过低自动退出了,新版的代码不兼容报错
- 最新版本人脸识别待解决
- Autojs好像挂了吗? HOT 2
- 最近无法收到详细的打卡结果了
- 这个会被钉钉检测到使用脚本打卡吗?
- 请问在华为手机里能正常运行,但是放到vivo手机里面就提示“错误:length=3;index=8” HOT 5
- 无法进入考勤界面
- 微信获取到消息但无法推送
- 发送「查询」获取到的是昨天的打卡数据
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dingding-automatic-clock-in.