findImage无法返回结果,一直卡死。我用的荣耀手机HONOR JAT-AL00
已存档
另外一个neo5正常返回是否找到
但是荣耀的卡死在函数调用。不返回是否找到目标
回答
调试的话,运行到该函数就自动结束脚本了,后面的代码不执行。
是否不支持该手机型号
代码如下,
1.vivo能走到弹窗"工作结束"
2.荣耀走到D1之后,就立刻提示脚本结束
还过其他images的函数结果都一样
var p = null;
if (!requestScreenCapture())
{
toastLog('没有授予 Hamibot 屏幕截图权限');
hamibot.exit();
}
sleep(1000);
toastLog('开始工作');
sleep(1000);
const img = captureScreen();
toastLog('D1');
p = findImage(img, img,{
threshold: 0.9,
});
alert('结束工作');
0
0