Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 8583

ISE V3 Extracting console text via script

$
0
0

Windows 7 SP1 PowerShell V3
When run from the script pane, with ABC 123 entered in the command line, these lines produce the following:

Write-Host $psISE.CurrentPowerShellTab.ConsolePane.Text
The complete text from the console pane. This works as expected.

Write-Host $psISE.CurrentPowerShellTab.ConsolePane.InputText
<Blank line>

$psISE.CurrentPowerShellTab.Prompt
<Blank line>

My question is how do I extract ABC 123 in a script, ie why are the above 2 lines blank? This worked fine in ISE V2 before the command pane was renamed and $psISE.Options....CommandPane.Text worked and extracted the required line.


Viewing all articles
Browse latest Browse all 8583

Trending Articles