mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-07-01 05:23:54 +08:00
update: runVbs调整
This commit is contained in:
parent
c095084c35
commit
12849533f0
@ -368,11 +368,12 @@ 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)
|
||||||
},
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 运行vbs脚本
|
// 运行vbs脚本
|
||||||
runVbs: function (script) {
|
if (process.platform == 'win32') quickcommand.runVbs = function (script) {
|
||||||
if (process.platform != 'win32') return
|
|
||||||
return new Promise((reslove, reject) => {
|
return new Promise((reslove, reject) => {
|
||||||
var tempfile = path.join(os.tmpdir(), 'TempVBSScript.vbs')
|
var tempfile = path.join(os.tmpdir(), 'TempVBSScript.vbs')
|
||||||
fs.writeFile(tempfile, iconv.encode(script, 'gbk'), err => {
|
fs.writeFile(tempfile, iconv.encode(script, 'gbk'), err => {
|
||||||
@ -385,7 +386,6 @@ quickcommand = {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
swalOneByOne = options => {
|
swalOneByOne = options => {
|
||||||
swal.getQueueStep() ? Swal.insertQueueStep(options) : Swal.queue([options])
|
swal.getQueueStep() ? Swal.insertQueueStep(options) : Swal.queue([options])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user