Skip to content

Commit

Permalink
fix: 赠送按钮颜色判断过于严格 #18
Browse files Browse the repository at this point in the history
  • Loading branch information
Zebartin committed Mar 13, 2023
1 parent c9231f3 commit 962c22c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion NIKKE/NIKKE日常.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ function 好友() {
back();
ocrUntilFound(res => res.text.match(/(可以|目录|搜寻|赠送)/) != null, 20, 1500);
let btnColor = colors.toString(images.pixel(captureScreen(), sendBtn.bounds.left, sendBtn.bounds.top));
if (colors.isSimilar('#1aaff7', btnColor, 10)) {
log(`赠送按钮颜色:${btnColor}`)
if (colors.isSimilar('#1aaff7', btnColor, 30)) {
clickRect(sendBtn);
toastLog('点击赠送');
clickRect(ocrUntilFound(res => res.find(e => e.text.includes('确认')), 30, 1000));
Expand Down

0 comments on commit 962c22c

Please sign in to comment.