From e014c5d626578bd97d1a9f67338e8e2603edfbc2 Mon Sep 17 00:00:00 2001 From: 5117600049 <511760049@qq.com> Date: Wed, 23 Apr 2025 11:33:17 +0800 Subject: [PATCH] =?UTF-8?q?JS=E8=84=9A=E6=9C=AC=EF=BC=9A=E6=96=99=E7=90=86?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E5=8F=8A=E6=96=99=E7=90=86=E5=8A=A0=E5=B7=A5?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E8=BF=9B=E8=A1=8CinputTest=E6=94=B9=E9=80=A0?= =?UTF-8?q?=EF=BC=8C=E5=8E=9F=E6=96=B9=E6=B3=95=E5=B0=86=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E4=B8=B2=E6=8B=86=E5=88=86=E5=90=8E=EF=BC=8C=E9=80=9A=E8=BF=87?= =?UTF-8?q?=20key=20press=20=E8=BE=93=E5=85=A5=20(#632)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update manifest.json * Update main.js * Update manifest.json * Update settings.json * Update main.js * Update manifest.json * Update settings.json --- repo/js/使用料理/main.js | 14 ++++---------- repo/js/使用料理/manifest.json | 6 +++--- repo/js/使用料理/settings.json | 4 ++-- repo/js/料理制作及食材加工/main.js | 7 ++----- repo/js/料理制作及食材加工/manifest.json | 6 +++--- repo/js/料理制作及食材加工/settings.json | 4 ++-- 6 files changed, 16 insertions(+), 25 deletions(-) diff --git a/repo/js/使用料理/main.js b/repo/js/使用料理/main.js index 1f215625..ca19f1c8 100644 --- a/repo/js/使用料理/main.js +++ b/repo/js/使用料理/main.js @@ -1,6 +1,7 @@ (async function () { let foodName = settings.foodName ?? 0; if(foodName){ +await genshin.returnMainUi(); await sleep(1000); keyPress("B");//打开背包 await sleep(2000); @@ -12,15 +13,7 @@ click(195, 1020);//重置 await sleep(1000); click(110, 110);//输入名字 await sleep(1000); -//恢复类食物click(75, 265); -//攻击类食物click(75, 350); -//冒险类食物click(75, 435); -//防御类食物click(75, 520); -//药剂click(75, 610); -for (const char of foodName) { - keyPress(char); - await sleep(500); -} +inputText(`${foodName}`); keyPress("SPACE"); await sleep(500); click(490, 1020);//确认筛选 @@ -31,6 +24,7 @@ click(1690, 1015);//使用 await sleep(1000); keyPress("ESCAPE"); await sleep(1500); -}; +await genshin.returnMainUi(); +} })(); diff --git a/repo/js/使用料理/manifest.json b/repo/js/使用料理/manifest.json index aec43194..2d3b87b7 100644 --- a/repo/js/使用料理/manifest.json +++ b/repo/js/使用料理/manifest.json @@ -1,8 +1,8 @@ { "manifest_version": 1, "name": "料理使用", - "version": "1.0", - "description": "请输入料理名称常见部分的拼音小写,比如月亮派输入yueliang", + "version": "1.1", + "description": "请输入料理全部名称,需要0.44.6以及以上版本", "authors": [ { "name": "柒叶子", @@ -11,4 +11,4 @@ ], "settings_ui": "settings.json", "main": "main.js" -} \ No newline at end of file +} diff --git a/repo/js/使用料理/settings.json b/repo/js/使用料理/settings.json index 07e320af..122b323e 100644 --- a/repo/js/使用料理/settings.json +++ b/repo/js/使用料理/settings.json @@ -2,6 +2,6 @@ { "name": "foodName", "type": "input-text", - "label": "请输入料理名称常见部分的拼音小写(月亮派,yueliang)" + "label": "请输入料理的正确名称 " }, - ] \ No newline at end of file + ] diff --git a/repo/js/料理制作及食材加工/main.js b/repo/js/料理制作及食材加工/main.js index 35f393d8..c6e6f705 100644 --- a/repo/js/料理制作及食材加工/main.js +++ b/repo/js/料理制作及食材加工/main.js @@ -1,7 +1,7 @@ (async function () { let foodName = settings.foodName ?? 0; -let foodNum = settings.foodNum ?? 0; +let foodNum = settings.foodNum ?? 1; let flourNum = settings.flourNum ?? 0; let creamNum = settings.creamNum ?? 0; let smokedPoultryNum = settings.smokedPoultryNum ?? 0; @@ -30,10 +30,7 @@ click(195, 1020);//重置 await sleep(1000); click(110, 110);//输入名字 await sleep(1000); -for (const char of foodName) { - keyPress(char); - await sleep(500); -} +inputText(`${foodName}`); keyPress("SPACE"); await sleep(500); click(490, 1020);//确认筛选 diff --git a/repo/js/料理制作及食材加工/manifest.json b/repo/js/料理制作及食材加工/manifest.json index b254563a..71f24e89 100644 --- a/repo/js/料理制作及食材加工/manifest.json +++ b/repo/js/料理制作及食材加工/manifest.json @@ -1,8 +1,8 @@ { "manifest_version": 1, "name": "料理制作及食材加工", - "version": "1.0", - "description": "自动烹饪料理以及加工食材", + "version": "1.1", + "description": "自动烹饪料理以及加工食材,需要0.44.6及以上版本", "authors": [ { "name": "柒叶子", @@ -11,4 +11,4 @@ ], "settings_ui": "settings.json", "main": "main.js" -} \ No newline at end of file +} diff --git a/repo/js/料理制作及食材加工/settings.json b/repo/js/料理制作及食材加工/settings.json index d4b98d1a..929e9e6a 100644 --- a/repo/js/料理制作及食材加工/settings.json +++ b/repo/js/料理制作及食材加工/settings.json @@ -2,7 +2,7 @@ { "name": "foodName", "type": "input-text", - "label": "请输入料理的拼音小写" + "label": "请输入料理的全名" }, { @@ -84,4 +84,4 @@ }, - ] \ No newline at end of file + ]