PoshCode Logo PowerShell Code Repository

Write-IseFile by Bernd Kriszio 24 months ago
embed code: <script type="text/javascript" src="http://PoshCode.org/embed/1619"></script>download | new post

If you are using ISE put this file anywhere into your PATH and functions depending on it can use it. . . Require-Function Write-IseFile
$a = New-ISEFile
Write-ISEFile $a ‘This line will neither be wrapped nor truncated’

  1. you find Require-Function in http://poshcode.org/1617

  1. function Write-IseFile($file, $msg)
  2. {
  3.     $Editor = $file.Editor
  4.     $Editor.SetCaretPosition($Editor.LineCount, 1)
  5.     $Editor.InsertText(($msg  + "`r`n"))
  6. }

Submit a correction or amendment below (
click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:


Remember me