截图是正在录屏被占用,上方的视频并不正常
if(!requestScreenCapture()){
   toast("请求截图失败");
   exit
}
for (y = 0; y < 60; y++) {
        var n = y
        if (text(y + "岁").exists()) {
            var yy = text(y + "岁").find()
            var xxx = yy[0].bounds().left
            var yyy = yy[0].bounds().top
            log("年龄存在" + xxx + yyy)
//获取在点(x, y)处的颜色
sleep(1000)
var x1=xxx+33
var y1=yyy+35
var c = images.pixel(captureScreen(), x1, y1);
var q = colors.toString(c)
toastLog(q)
sleep(500)
var ys =["#ff03a2b3","#ff46102b"]
if(ys.indexOf(q)!=-1){
toastLog("识别结果:男")
}else{
toastLog("识别结果:女")
}
}}
//#ff2d3f5b

发表评论

后才能评论