mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-07-01 13:32:45 +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'))
|
let local = path.join(root, require('crypto').createHash('md5').update(url).digest('hex'))
|
||||||
if (forceUpdate || !fs.existsSync(local)) await this.downloadFile(remote, local)
|
if (forceUpdate || !fs.existsSync(local)) await this.downloadFile(remote, local)
|
||||||
return require(local)
|
return require(local)
|
||||||
|
},
|
||||||
|
|
||||||
|
// 唤醒 uTools
|
||||||
|
wakeUtools: function() {
|
||||||
|
child_process.exec(process.execPath, () => {})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,6 +301,15 @@ interface quickcommandApi {
|
|||||||
* 模拟粘贴操作
|
* 模拟粘贴操作
|
||||||
*/
|
*/
|
||||||
simulatePaste();
|
simulatePaste();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 唤醒 uTools
|
||||||
|
*
|
||||||
|
* 当插件自身已经退出时,utools.showMainWindow() 将不再起作用
|
||||||
|
*
|
||||||
|
* 此时可以用此接口呼出 uTools 窗口
|
||||||
|
*/
|
||||||
|
wakeUtools();
|
||||||
}
|
}
|
||||||
|
|
||||||
declare var quickcommand: quickcommandApi;
|
declare var quickcommand: quickcommandApi;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user