mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-07-01 05:23:54 +08:00
增加读写剪贴板的接口
This commit is contained in:
parent
54790b5ea5
commit
f0e4022e3b
@ -174,6 +174,14 @@ window.quickcommand = {
|
|||||||
process.execPath
|
process.execPath
|
||||||
child_process.exec(uToolsPath, () => {})
|
child_process.exec(uToolsPath, () => {})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
readClipboard: function() {
|
||||||
|
return electron.clipboard.readText()
|
||||||
|
},
|
||||||
|
|
||||||
|
writeClipboard: function(text) {
|
||||||
|
electron.clipboard.writeText(text)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 运行vbs脚本
|
// 运行vbs脚本
|
||||||
|
12
src/plugins/monaco/types/quickcommand.api.d.ts
vendored
12
src/plugins/monaco/types/quickcommand.api.d.ts
vendored
@ -352,6 +352,18 @@ interface quickcommandApi {
|
|||||||
*/
|
*/
|
||||||
simulatePaste();
|
simulatePaste();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取剪贴板
|
||||||
|
*/
|
||||||
|
readClipboard(): text<string>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 写入剪贴板
|
||||||
|
*
|
||||||
|
* @param text 要写入的文本
|
||||||
|
*/
|
||||||
|
writeClipboard(text: string);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 唤醒 uTools
|
* 唤醒 uTools
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user