SuperMonster003
SuperMonster003
你可以通过以下方式依次排查问题: - Auto.js 其他衍生版本 (Auto.js 4.x, AutoX, Auto.js Pro 等) 是否可以正常分析布局 - 使用 AutoJs6 分析其他应用或页面是否可以正常分析布局 由此基本可以判断出是否是截图中 App 对应的页面本身做了修改, 导致布局分析无法获取到预期控件.
未来 AutoJs6 将新增 `ui.navigationBarHeight` 属性 (getter), 用于获取导航栏高度. 另外也欢迎将你的解决方案在此处分享给其他有需要的用户及开发者.
使用 [WindowInsets](https://developer.android.com/reference/android/view/WindowInsets) 可以获取系统栏的高度, 但它依赖于一个 Anchor View, 可以理解为一个锚点视图, 典型的秒点视图是 `android.view.Window#getDecorView()` 得到的视图. 有了上述锚点视图, 就可以准确获取导航栏及状态栏的高度了. 一个 Kotlin 示例代码: ```kt val window = getWindowForContext(context) // [1] Status bar height solution based on WindowInsets. //...
感谢反馈. 下面的判断条件有误 (app/src/main/java/org/autojs/autojs/runtime/api/augment/notice/Notice.kt): ```kt // @Signature notice(title: string, content: string, options?: Notice.Options): void; require(argList.size
您好, 感谢反馈. ```java @SuppressLint("HardwareIds") public String getAndroidId() { return Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.ANDROID_ID); } ``` 不考虑多用户的情况下, 上述代码在同一个设备 (Android 8.0+) 不同签名的应用中, 获取到的值是不一致的. 可以发现, 读取 `ANDROID_ID` 并不需要额外的权限, 但它不适合作为跨应用跨设备的 "设备唯一标识", 否则它很容易作为重要的隐私信息之一被任意应用获取. 另外, 签名一致手段虽然理论上可行, 但 AutoJs6...
感谢反馈, 这是一个相对难以发现的 bug. 问题在于 `ocr.xxx.detect` 方法对 `ocr.mode` 的判断出现了条件遗漏, 而 `ocr.xxx.recognizeText` 是正常的. 源码体现如下: ```kt val results = when (scriptRuntime.ocr.mode) { OcrMode.MLKIT -> OcrMLKit.detectInternal(scriptRuntime, image, options) OcrMode.PADDLE -> OcrPaddle.detectInternal(scriptRuntime, image, options) OcrMode.RAPID...
通过 toast 消息, 推测完整的类名应该是 `com.evernote.android.job.v14.PlatformAlarmReceiver`. AutoJs6 内部 "定时任务" 功能目前使用的是 Auto.js 4.x 遗留下来的 Evernote Android-Job 库, 它会通过广播 + Alarm/JobScheduler 唤醒并执行定时任务. 定时任务是在后台被广播唤醒, 有可能会触发系统限制, 从而出现 "Unable to start receiver" 的报错. 未来 AutoJs6 会支持在...
首先非常感谢你的反馈, 也很感谢你提交的 PR #439. 这个 Issue 我需要一个连续的大段时间来认真回复, 我会尽量在 8 月份结束前给出答复.
解决方案 1: PR https://github.com/SuperMonster003/AutoJs6/pull/439. 即设置 `org.mozilla.javascript.WrapFactory#isJavaPrimitiveWrap` 为 `false` (默认为 `true`). 解决方案 2: 模块 `threads` 的 `disposable` 方法返回一个 JavaScript 对象 (而非 Java 对象). 对于其他 Auto.js 版本 (非 AutoJs6), 在 modules/\_\_threads\_\_.js 文件中拦截...
是的, `setAndNotify` 是一个 Java 方法, 它位于 `org.autojs.autojs.concurrent.VolatileDispose#setAndNotify`: ```java public void setAndNotify(T value) { synchronized (this) { mValue = value; notify(); } } ``` 使用脚本调用时, 如 `xxx.setAndNotify(true);`, JavaScript 的 `true` 会被...