是否有可能将文本发送到当前提示行?类似以下内容:
PS[10]> Get-Location
c:/
PS[11]> Write-PromptLine "This text has been written by Powershell"
PS[12]> This text has been written by Powershell|
# | denotes the caret
是否有可能将文本发送到当前提示行?类似以下内容:
PS[10]> Get-Location
c:/
PS[11]> Write-PromptLine "This text has been written by Powershell"
PS[12]> This text has been written by Powershell|
# | denotes the caret
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
[System.Windows.Forms.SendKeys]::SendWait("This text has been written by Powershell")
$host
对象能够提供那个功能,但我会稍后尝试你的方法是否适用于我。谢谢。 - guillermooo