js: QuickSwapGadgets: 切换到快捷更换栏指定编号的小道具 (#677)
This commit is contained in:
13
repo/js/QuickSwapGadgets/main.js
Normal file
13
repo/js/QuickSwapGadgets/main.js
Normal file
@@ -0,0 +1,13 @@
|
||||
(async function () {
|
||||
if (settings.NumberOfGadget === undefined) {
|
||||
log.error("请在'JS脚本自定义配置'中设置要切换的小道具编号");
|
||||
return;
|
||||
}
|
||||
await genshin.returnMainUi();
|
||||
log.debug("切换到{key}", settings.NumberOfGadget);
|
||||
keyDown("z");
|
||||
await sleep(1200);
|
||||
keyUp("z");
|
||||
let key = "VK_" + settings.NumberOfGadget[0];
|
||||
keyPress(key);
|
||||
})();
|
||||
13
repo/js/QuickSwapGadgets/manifest.json
Normal file
13
repo/js/QuickSwapGadgets/manifest.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"name": "切换小道具",
|
||||
"version": "1.0.0",
|
||||
"description": "切换小道具 ",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Patrick-Ze (AyakaMain)"
|
||||
}
|
||||
],
|
||||
"settings_ui": "settings.json",
|
||||
"main": "main.js"
|
||||
}
|
||||
13
repo/js/QuickSwapGadgets/settings.json
Normal file
13
repo/js/QuickSwapGadgets/settings.json
Normal file
@@ -0,0 +1,13 @@
|
||||
[
|
||||
{
|
||||
"name": "NumberOfGadget",
|
||||
"type": "select",
|
||||
"label": "选项框",
|
||||
"options": [
|
||||
"1号小道具",
|
||||
"2号小道具",
|
||||
"3号小道具",
|
||||
"4号小道具"
|
||||
]
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user