We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
// 截屏查找图片颜色并单击对应的点 function cs_click(num, rgb, xr, yr, wr, hr, flipup) { while (num--) { let img = captureScreen() if (flipup != undefined) img = images.rotate(img, 180) let point = findColor(img, rgb, { region: [img.getWidth() * xr, img.getHeight() * yr, img.getWidth() * wr, img.getHeight() * hr], threshold: 8 }) if (point) { if (flipup != undefined) { point.x = img.getWidth() - point.x; point.y = img.getHeight() - point.y } return click(point.x, point.y); } if (num) sleep(1000) } return false }
cs_click(6, '#fed362', 0.2, 0.05, 0.7, 0.4, true) //领取套装
上面的参数通过什么方式来获取
The text was updated successfully, but these errors were encountered:
// 截屏查找图片颜色并单击对应的点 function cs_click(num, rgb, xr, yr, wr, hr, flipup) { while (num--) { let img = captureScreen() if (flipup != undefined) img = images.rotate(img, 180) let point = findColor(img, rgb, { region: [img.getWidth() * xr, img.getHeight() * yr, img.getWidth() * wr, img.getHeight() * hr], threshold: 8 }) if (point) { if (flipup != undefined) { point.x = img.getWidth() - point.x; point.y = img.getHeight() - point.y } return click(point.x, point.y); } if (num) sleep(1000) } return false } cs_click(6, '#fed362', 0.2, 0.05, 0.7, 0.4, true) //领取套装 上面的参数通过什么方式来获取
这个可以通过取色、取坐标代码来实现,具体你可以搜一下,不明白的是为什么要将图片翻转180度?是因为取色不方便吗?
Sorry, something went wrong.
No branches or pull requests
// 截屏查找图片颜色并单击对应的点
function cs_click(num, rgb, xr, yr, wr, hr, flipup) {
while (num--) {
let img = captureScreen()
if (flipup != undefined) img = images.rotate(img, 180)
let point = findColor(img, rgb, { region: [img.getWidth() * xr, img.getHeight() * yr, img.getWidth() * wr, img.getHeight() * hr], threshold: 8 })
if (point) {
if (flipup != undefined) {
point.x = img.getWidth() - point.x; point.y = img.getHeight() - point.y
}
return click(point.x, point.y);
}
if (num) sleep(1000)
}
return false
}
cs_click(6, '#fed362', 0.2, 0.05, 0.7, 0.4, true) //领取套装
上面的参数通过什么方式来获取
The text was updated successfully, but these errors were encountered: