mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-30 21:13:02 +08:00
新增 quickcommand.wakeUtools
This commit is contained in:
parent
9d21495faa
commit
010353f0bb
@ -162,6 +162,11 @@ window.quickcommand = {
|
||||
let local = path.join(root, require('crypto').createHash('md5').update(url).digest('hex'))
|
||||
if (forceUpdate || !fs.existsSync(local)) await this.downloadFile(remote, local)
|
||||
return require(local)
|
||||
},
|
||||
|
||||
// 唤醒 uTools
|
||||
wakeUtools: function() {
|
||||
child_process.exec(process.execPath, () => {})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -301,6 +301,15 @@ interface quickcommandApi {
|
||||
* 模拟粘贴操作
|
||||
*/
|
||||
simulatePaste();
|
||||
|
||||
/**
|
||||
* 唤醒 uTools
|
||||
*
|
||||
* 当插件自身已经退出时,utools.showMainWindow() 将不再起作用
|
||||
*
|
||||
* 此时可以用此接口呼出 uTools 窗口
|
||||
*/
|
||||
wakeUtools();
|
||||
}
|
||||
|
||||
declare var quickcommand: quickcommandApi;
|
||||
|
Loading…
x
Reference in New Issue
Block a user