将发送文本从消息通知移到模拟操作,增加模拟粘贴选项

This commit is contained in:
fofolee
2025-01-08 15:05:21 +08:00
parent 7a43695e2d
commit 6af4a15e2a
4 changed files with 62 additions and 34 deletions

View File

@@ -1,7 +1,9 @@
const { findImage } = require("./imageFinder");
const { captureScreen } = require("./screenCapture");
const sendText = require("./sendText");
module.exports = {
findImage,
captureScreen,
sendText,
};

View File

@@ -0,0 +1,11 @@
const sendText = (text, simulateCopy = false) => {
if (simulateCopy) {
window.utools.copyText(text);
quickcommand.sleep(200);
quickcommand.simulatePaste();
} else {
window.utools.hideMainWindowTypeString(text);
}
};
module.exports = sendText;