mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-16 04:45:46 +00:00
修复Way05无法带参
This commit is contained in:
parent
5f15774ec7
commit
4501d73134
@ -45,7 +45,14 @@ $jsCode | Out-File -FilePath $jsFilePath -Encoding UTF8
|
||||
Write-Output "JavaScript code has been generated and saved to $jsFilePath"
|
||||
# 设置NAPCAT_PATH环境变量为 当前目录的loadScript.js地址
|
||||
$env:NAPCAT_PATH = $jsFilePath
|
||||
|
||||
for ($i = 0; $i -lt $args.Length; $i++) {
|
||||
$param = $args[$i]
|
||||
if ($args[$i] -eq "-q" -and $i + 1 -lt $args.Length) {
|
||||
$nextParam = $args[$i + 1]
|
||||
$params = "$param $nextParam"
|
||||
break
|
||||
}
|
||||
}
|
||||
Try {
|
||||
$QQpath = Get-QQpath
|
||||
}
|
||||
@ -57,4 +64,4 @@ Catch {
|
||||
}
|
||||
|
||||
$commandInfo = Get-Command $QQpath -ErrorAction Stop
|
||||
Start-Process powershell -ArgumentList "-noexit", "-noprofile", "-command &{& chcp 65001;& '$($commandInfo.Path)' --enable-logging }"
|
||||
Start-Process powershell -ArgumentList "-noexit", "-noprofile", "-command &{& chcp 65001;& '$($commandInfo.Path)' --enable-logging $params}"
|
||||
|
@ -45,8 +45,14 @@ $jsCode | Out-File -FilePath $jsFilePath -Encoding UTF8
|
||||
Write-Output "JavaScript code has been generated and saved to $jsFilePath"
|
||||
# 设置NAPCAT_PATH环境变量为 当前目录的loadScript.js地址
|
||||
$env:NAPCAT_PATH = $jsFilePath
|
||||
|
||||
$params = $args -join " "
|
||||
for ($i = 0; $i -lt $args.Length; $i++) {
|
||||
$param = $args[$i]
|
||||
if ($args[$i] -eq "-q" -and $i + 1 -lt $args.Length) {
|
||||
$nextParam = $args[$i + 1]
|
||||
$params = "$param $nextParam"
|
||||
break
|
||||
}
|
||||
}
|
||||
Try {
|
||||
$QQpath = Get-QQpath
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user