fix: 鼠标坐标超出游戏窗口 (#2302)

This commit is contained in:
起个名字好难的喵
2025-11-03 15:06:17 +08:00
committed by GitHub
parent c3e8a208d5
commit 8dce358155
2 changed files with 3 additions and 3 deletions

View File

@@ -520,7 +520,7 @@ async function recognizeTextAndClick(targetText, ocrRegion, timeout = 8000) {
keyDown("VK_MENU");
await sleep(500);
for (let i = 0; i <= 4; i++) {
await click(genshin.width / 2.0, genshin.height * 0.8);
await click(math.round(genshin.width / 2.0), math.round(genshin.height * 0.8));
await sleep(1000);
}
} finally {
@@ -584,7 +584,7 @@ async function recognizeTextAndClick(targetText, ocrRegion, timeout = 8000) {
keyDown("VK_MENU");
await sleep(500);
for (let i = 0; i <= 4; i++) {
await click(genshin.width / 2.0, genshin.height * 0.8);
await click(math.round(genshin.width / 2.0), math.round(genshin.height * 0.8));
await sleep(1000);
}
//keyUp("VK_MENU");

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 1,
"name": "切换账号多模式",
"version": "1.0",
"version": "1.1",
"bgi_version": "0.49.0",
"description": "多种模式的切换账号有下拉列表、填写账号密码OCR操作或键鼠操作\n免责申明所有的账号密码均保存在本地请使用者妥善保管账号密码请勿外泄账号密码。若因使用此脚本导致的账号泄露、封禁问题与脚本作者无关。",
"tags": [