求助多点找色,谢谢
管理员

JavaException:java.lang.IllegalArgumentException: x must be<bitmap.width()
老是抛出这个异常,为什么呢

最后由 O了吗 编辑
管理员

顶顶

x 必须小于截图的宽度。

管理员

@wwwzzzggg 那要怎么解决呢,多点找色应该不用考虑超出范围问题吧

管理员

@admin


if (!requestScreenCapture()) {
    toast("请求截图失败");
    exit();
}
ar = [[0,0,"#ffffffff"],[11,0,"#ffffffff"],[22,0,"#ffffffff"],[33,0,"#ffffffff"],[44,0,"#ffffffff"],[55,0,"#ffffffff"],[0,11,"#ffffffff"],[11,11,"#ffffffff"],[22,11,"#ff818181"],[33,11,"#ff494949"],[44,11,"#ffffffff"],[55,11,"#ffffffff"],[0,22,"#ffffffff"],[11,22,"#ff3b3b3b"],[22,22,"#ffb6b6b6"],[33,22,"#ff3c3c3c"],[44,22,"#ff3a3a3a"],[55,22,"#ffffffff"],[0,33,"#ffffffff"],[11,33,"#ff3a3a3a"],[22,33,"#ffffffff"],[33,33,"#ffffffff"],[44,33,"#ffffffff"],[55,33,"#ffffffff"],[0,44,"#ffffffff"],[11,44,"#ff3a3a3a"],[22,44,"#ffffffff"],[33,44,"#ffffffff"],[44,44,"#fffdfdfd"],[55,44,"#ffffffff"],[0,55,"#ffffffff"],[11,55,"#ff3a3a3a"],[22,55,"#ff3b3b3b"],[33,55,"#ff3b3b3b"],[44,55,"#ff464646"],[55,55,"#ffffffff"]];

p = null;
while (p == null) {
    try{    
        p = images.findMultiColors(captureScreen(), ar[0][2], ar, {threshold: 10 });
    }
    catch(e){
        log(e);
        sleep(100);
    }
}
press(p.x, p.y, 100);
toast("ok");
开发者

问题已经修复,请在下次内测版更新

管理员

  • 8
    帖子
  • 1760
    浏览

与 Auto.js 的连接断开,我们正在尝试重连,请耐心等待