# encoding: ascii # api: powershell # title: Write-IseFile # description: If you are using ISE put this file anywhere into your PATH and functions depending on it can use it. # version: 0.1 # type: function # license: CC0 # function: Write-IseFile # x-poshcode-id: 1619 # x-archived: 2010-02-03T15:55:54 # # . . Require-Function Write-IseFile # $a = New-ISEFile # Write-ISEFile $a ‘This line will neither be wrapped nor truncated’ # you find Require-Function in http://poshcode.org/1617 # function Write-IseFile($file, $msg) { $Editor = $file.Editor $Editor.SetCaretPosition($Editor.LineCount, 1) $Editor.InsertText(($msg + "`r`n")) }