ocr范围修改 (#2666)

* 增加延迟

* 更改OCR范围

* Update main.js
This commit is contained in:
skyflag2022
2026-01-13 10:09:57 +08:00
committed by GitHub
parent 47a0b02d8b
commit b60f78f260
2 changed files with 7 additions and 7 deletions

View File

@@ -2,10 +2,10 @@ let userName = settings.userName || "默认账户";
const recoveryFoodName = settings.recoveryFoodName || "回血药名字没填";
const resurrectionFoodName = settings.resurrectionFoodName || "复活药名字没填";
const ocrRegion = {
x: 150,
y: 250,
width: 60,
height: 20
x: 110,
y: 242,
width: 124,
height: 32
};
const loadDelay = +settings.loadDelay || 800;
const stepDelay = +settings.stepDelay || 500;
@@ -340,7 +340,7 @@ const stepDelay = +settings.stepDelay || 500;
// 处理回血药识别结果
if (recoveryNumber === null) {
recoveryNumber = 0;
notification.send(`未识别到回血药数量设置数量为0药品名${recoveryFoodName}`)
notification.send(`未识别到回血药数量(数量小于10识别不到)设置数量为0药品名${recoveryFoodName}`)
await sleep(5000);
click(863, 51);//选择食物
await sleep(1000);
@@ -360,7 +360,7 @@ const stepDelay = +settings.stepDelay || 500;
// 处理复活药识别结果
if (resurrectionNumber === null) {
resurrectionNumber = 0;
notification.send(`未识别到复活药数量设置数量为0药品名${resurrectionFoodName}`)
notification.send(`未识别到复活药数量(数量小于10识别不到)设置数量为0药品名${resurrectionFoodName}`)
await sleep(5000);
click(863, 51);//选择食物
await sleep(1000);

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 1,
"name": "吃药统计",
"version": "1.6",
"version": "1.6.1",
"bgi_version": "0.51",
"description": "用于统计指定两个食物的消耗,推荐锄地前后使用",
"authors": [