Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

Why does the WRITE-HOST in the tiny script make the output flicker?

$
0
0

Here is a tiny reproduction of a screen output issue I am having. I guess I don't understand why this flickers since I am repainting the same pixels each loop.

Thanks for any suggestions

Function CoordinateXY
{
 Param([Int] $x, [int] $y)
 $Position = $host.ui.rawui.CursorPosition
 $Position.X = $X
 $Position.Y = $Y
 $host.ui.rawui.CursorPosition = $Position
}


cls
while(1 -ne 2)
{
 coordinatexy 10 10
 Write-Host -NoNewline "why am I flickering"
}


Viewing all articles
Browse latest Browse all 2562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>