Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

报错 #2

Closed
MangoBear-CN opened this issue May 27, 2022 · 9 comments
Closed

报错 #2

MangoBear-CN opened this issue May 27, 2022 · 9 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@MangoBear-CN
Copy link

ReferenceError: "$floaty" is not defined. (/storage/emulated/0/脚本/dingtakll-auto-checkin-main/dingtakll-auto-checkin-main/MainUi.js#483)
ReferenceError: "$floaty" is not defined.
at /storage/emulated/0/脚本/dingtakll-auto-checkin-main/dingtakll-auto-checkin-main/MainUi.js:483:0

@MangoBear-CN
Copy link
Author

不能点击获取来获取定位,判断定位总弹出来设置页面,我给取反了

@0x7A7A6572
Copy link
Owner

0x7A7A6572 commented May 28, 2022

  • $floaty is not defined.是因为autojs pro版本的问题你可以把"$"去掉,在低版本中或者auotx中会生效。
  • 判断定位那里我没有做不同手机的适配,只适配了miui,具体代码在/utils/AppUtils.js 里面,你可以提供一下手机型号和定位设置界面截图。
  • 谢谢你的issue😘

@0x7A7A6572
Copy link
Owner

gpsCheck(returnPackageName, turnon, stopNumber)其实是检查并更改为trunon的状态,这里是我的命名问题

@MangoBear-CN
Copy link
Author

  • $floaty is not defined.是因为autojs pro版本的问题你可以把"$"去掉,在低版本中或者auotx中会生效。
  • 判断定位那里我没有做不同手机的适配,只适配了miui,具体代码在/utils/AppUtils.js 里面,你可以提供一下手机型号和定位设置界面截图。
  • 谢谢你的issue😘
    手机品牌:华为mete20 ,现在已经可以点定位了,我又遇见了新的问题,就是截图以后无法分享到群,button_group_name != null这个判断不为空,可就是无法点击。我对js不太懂,不知道是不是我把代码后面都加了 ; 的原因

@0x7A7A6572
Copy link
Owner

手机品牌:华为mete20 ,现在已经可以点定位了,我又遇见了新的问题,就是截图以后无法分享到群,button_group_name != null这个判断不为空,可就是无法点击。我对js不太懂,不知道是不是我把代码后面都加了 ; 的原因
跳转到分享界面后,要分享的群聊是否在可视范围内?这个可能是因为虽然界面分析有群聊名,但是不在屏幕内,导致无法点击。
如果是这个情况,后面会考虑在分享界面添加搜索群聊或者下滑直到找到群聊的逻辑😁

@MangoBear-CN
Copy link
Author

手机品牌:华为mete20 ,现在已经可以点定位了,我又遇见了新的问题,就是截图以后无法分享到群,button_group_name != null这个判断不为空,可就是无法点击。我对js不太懂,不知道是不是我把代码后面都加了 ; 的原因
跳转到分享界面后,要分享的群聊是否在可视范围内?这个可能是因为虽然界面分析有群聊名,但是不在屏幕内,导致无法点击。
如果是这个情况,后面会考虑在分享界面添加搜索群聊或者下滑直到找到群聊的逻辑😁

是首页,第一个就是,我把显示触摸操作打开了,并没有发现它进行了click。但就是不知道为什么button_group_name.click()没有生效。

@0x7A7A6572
Copy link
Owner

0x7A7A6572 commented May 28, 2022

如果没有报错信息,只是没有点击,那可能是找到的控件是不可点击,可以尝试clickCenter()点击控件中心位置(pro版本的api,或者使用/utils/AutojsUtil.js中我补充的方法clickCoordinate),我记得源码中我使用的是clickCenter不是click

0x7A7A6572 added a commit that referenced this issue May 28, 2022
修复在主界面用时间选择器修改定时任务不生效的问题
修复某些机型进入定位界面无法找到开启关闭定位开关的问题
添加了一些注释
把AppUtil中gpsCheck和gpsIsOpen迁移当了SystenUtil,并且ggpsCheck更名为gpsCheckAndDo
fix #1 #2
@0x7A7A6572 0x7A7A6572 added documentation Improvements or additions to documentation bug Something isn't working good first issue Good for newcomers labels May 28, 2022
@MangoBear-CN
Copy link
Author

大部分问题是因为我使用4.1.1导致的,例如无法解锁,我更改为下面的代码就可以使用了,原因是因为password为一个对象(不知道是不是叫这个),password.length无法获取长度。
let passwordArr = password.toString().split("");
for (let i = 0; i < passwordArr.length; i++) {
console.log("click数字:",passwordArr[i],"。");
click(numberPosition[passwordArr[i]][0], numberPosition[passwordArr[i]][1]);
另在鸿蒙系统中,截屏为"允许"
if (beginBtn = classNameContains("Button").textContains("允许").findOne(2000)) {
beginBtn.click();

@0x7A7A6572
Copy link
Owner

大部分问题是因为我使用4.1.1导致的,例如无法解锁,我更改为下面的代码就可以使用了,原因是因为password为一个对象(不知道是不是叫这个),password.length无法获取长度。 let passwordArr = password.toString().split(""); for (let i = 0; i < passwordArr.length; i++) { console.log("click数字:",passwordArr[i],"。"); click(numberPosition[passwordArr[i]][0], numberPosition[passwordArr[i]][1]); 另在鸿蒙系统中,截屏为"允许" if (beginBtn = classNameContains("Button").textContains("允许").findOne(2000)) { beginBtn.click();

1.解锁有多种办法,或许你这个方法更简单,我可能会加一个备用的选项开选择用点击坐标还是点击控件。
2.鸿蒙中允许截屏的按钮叫"允许",收到,下个版本将添加在设备差异配置一栏👏🏻
3. 旧版本autojs的确挺多问题,这个我暂时不考虑做兼容

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants