mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-03-21 04:19:51 +08:00
26 lines
545 B
JavaScript
26 lines
545 B
JavaScript
// 按键步骤处理器
|
|
(function () {
|
|
StepProcessorLoader.register("关闭商店界面", async function (step, context) {
|
|
try {
|
|
const isStoreUI = UI.UIUtils.isStoreUI;
|
|
|
|
await sleep(500);
|
|
if (isStoreUI) {
|
|
keyPress("VK_ESCAPE");
|
|
}
|
|
await sleep(500);
|
|
} catch (error) {
|
|
log.error("执行按键步骤时出错: {error}", error.message);
|
|
throw error;
|
|
}
|
|
});
|
|
})();
|
|
|
|
/*
|
|
JSON使用示例:
|
|
{
|
|
"type": "关闭商店界面",
|
|
"note": "关闭商店界面(如果现在在商店页面)"
|
|
}
|
|
*/
|