Compare commits
2 Commits
a22460f155
...
64a23405fb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
64a23405fb | ||
|
|
c68787bf23 |
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"time": "20250709123305",
|
"time": "20250709162716",
|
||||||
"url": "https://github.com/babalae/bettergi-scripts-list/archive/refs/heads/main.zip",
|
"url": "https://github.com/babalae/bettergi-scripts-list/archive/refs/heads/main.zip",
|
||||||
"file": "repo.json",
|
"file": "repo.json",
|
||||||
"indexes": [
|
"indexes": [
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
"type": 6,
|
"type": 6,
|
||||||
"mouseX": 0,
|
"mouseX": 0,
|
||||||
"mouseY": 0,
|
"mouseY": 0,
|
||||||
"time": 100
|
"time": 50
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info": {
|
"info": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
//拾取时上下滑动的时间
|
//拾取时上下滑动的时间
|
||||||
const timeMoveUp = 600;
|
const timeMoveUp = 500;
|
||||||
const timeMoveDown = 1200;
|
const timeMoveDown = 1000;
|
||||||
|
|
||||||
(async function () {
|
(async function () {
|
||||||
//自定义配置处理
|
//自定义配置处理
|
||||||
@@ -380,6 +380,7 @@ async function runPathWithOcr(pathFilePath, targetTexts, blacklistKeywords) {
|
|||||||
let lastMoveDown = 0;
|
let lastMoveDown = 0;
|
||||||
|
|
||||||
let lastPickupTime = new Date();
|
let lastPickupTime = new Date();
|
||||||
|
let lastPickupItem = "";
|
||||||
// 定义状态变量
|
// 定义状态变量
|
||||||
let state = { completed: false, cancelRequested: false };
|
let state = { completed: false, cancelRequested: false };
|
||||||
// 定义图像路径和目标文本列表
|
// 定义图像路径和目标文本列表
|
||||||
@@ -533,9 +534,10 @@ async function runPathWithOcr(pathFilePath, targetTexts, blacklistKeywords) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((new Date() - lastPickupTime) > 200) {
|
if ((new Date() - lastPickupTime) > 1000 || ocrResult.text != lastPickupItem) {
|
||||||
log.info(`交互或拾取:"${ocrResult.text}"`);
|
log.info(`交互或拾取:"${ocrResult.text}"`);
|
||||||
lastPickupTime = new Date();
|
lastPickupTime = new Date();
|
||||||
|
lastPickupItem = ocrResult.text;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 计算目标文本的中心Y坐标
|
// 计算目标文本的中心Y坐标
|
||||||
|
|||||||
Reference in New Issue
Block a user