0
可以在控制台中加载$ psise对象吗? 我想开在ISE几个文件,但这样做
>ise filename
>ise filename2
只需打开第一个。 ISE里面我没有这个问题,因为我用的是$ psise对象只在PowerShell_Ise.exe
环境中打开该文件
function qwe($file){
if(-not (Test-Path $file)){
New-Item -Name $file -ItemType file
}
$filepath = Resolve-Path $file;
$psISE.CurrentPowerShellTab.Files.Add($filepath)
}
也许是一个错误,我测试了几次,我发现了一个模式。如果我在ISE的脚本窗格中应用我说的代码而没有关注它,则会打开一个新选项卡。如果我在脚本窗格中有光标,则忽略对ise文件名X的任何后续调用 – mjsr 2010-08-05 21:01:41