function limit() {
    importClass(com.stardust.autojs.core.accessibility.AccessibilityBridge.WindowFilter);
    let bridge = runtime.accessibilityBridge;
    let bridgeField = runtime.getClass().getDeclaredField("accessibilityBridge");
    let configField = bridgeField.getType().getDeclaredField("mConfig");
    configField.setAccessible(true);
    configField.set(bridge, configField.getType().newInstance());
    bridge.setWindowFilter(new JavaAdapter(AccessibilityBridge$WindowFilter, {
        filter: function(info) {
            return true;
        }
    }));
    print(app.versionName);
    let list = selector().find();
    for (var i = 0; i < list.size(); i++) {
        var object = list.get(i);
        if (object.text() != "") {
            print(object.text());
        }
    }
}
limit();
//去除限制代码在上面。放到你代码"ui"下面就可以了
//打包后不限制APP使用

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注