win自动化分类新增界面自动化,支持向指定窗口指定控件发送键盘、鼠标消息

This commit is contained in:
fofolee
2025-01-14 01:20:20 +08:00
parent d477d634e3
commit 0ff5c4b49f
7 changed files with 1226 additions and 161 deletions

View File

@@ -208,7 +208,14 @@ const quickcommand = {
if (err) return reject(err.toString());
// 添加命令行参数
const argsStr =
args.length > 0 ? " " + args.map((arg) => `"${arg}"`).join(" ") : "";
args.length > 0
? " " +
args
.map((arg) =>
arg.startsWith("-") ? arg : `"${arg}"`
)
.join(" ")
: "";
child_process.exec(
`${cscPath} /nologo /out:${tempBuildFile} ${tempCsharpFile} && ${tempBuildFile}${argsStr}`,
{