// 分析全部窗口,点击控件前调用
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;
}
}));
}
limit();
这样就可以无所畏惧点击操作了