try to fix crash under android19

This commit is contained in:
hyb1996
2017-07-12 12:09:32 +08:00
parent fcfb3a69e0
commit c827ef7c64
5 changed files with 38 additions and 15 deletions

View File

@@ -1,3 +0,0 @@
module.exports = function(){
}

View File

@@ -0,0 +1,12 @@
if(!requestScreenCapture()){
toast("请求截图失败");
}
sleep(2000);
var x = 760;
var y = 180;
//获取在点(x, y)处的颜色
var c = images.pixel(captureScreen(), x, y);
//显示该颜色
toast((c >>> 0).toString(16));
//检测在点(x, y)处是否有颜色0x73bdb6 (模糊比较)
toast(images.detectsColor(captureScreen(), x, y, 0x73bdb6))