AutoBot icon indicating copy to clipboard operation
AutoBot copied to clipboard

Add support for "write-host"

Open mikeclayton opened this issue 13 years ago • 0 comments

Using write-host inside a script results in an exception as follows:

System.Management.Automation.Host.HostException: Cannot invoke this function because the current host does not implement it. at System.Management.Automation.Internal.Host.InternalHostRawUserInterface.ThrowNotInteractive() at System.Management.Automation.Internal.Host.InternalHostRawUserInterface.get_ForegroundColor() at Microsoft.PowerShell.Commands.ConsoleColorCmdlet.get_ForegroundColor() at Microsoft.PowerShell.Commands.WriteHostCommand.PrintObject(Object o) at Microsoft.PowerShell.Commands.WriteHostCommand.PrintObject(Object o) at Microsoft.PowerShell.Commands.WriteHostCommand.ProcessRecord() at System.Management.Automation.Cmdlet.DoProcessRecord() at System.Management.Automation.CommandProcessor.ProcessRecord()

Can autobot implement write-host so that it either just swallows the value, or maybe sends it to the autobot console for debugging?

mikeclayton avatar Nov 22 '11 11:11 mikeclayton