mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-23 10:28:23 +02:00
Update simulate-typewriter.ps1
This commit is contained in:
parent
00085eb531
commit
57defe3ffe
@ -11,12 +11,13 @@ if ($message -eq "" ) {
|
|||||||
$message = "`nHello World`n-----------`nPowerShell is cross-platform`nPowerShell is open-source`nPowerShell is easy to learn`nPowerShell is fully documented`n`nThanks for watching`n`n:-)`n`n"
|
$message = "`nHello World`n-----------`nPowerShell is cross-platform`nPowerShell is open-source`nPowerShell is easy to learn`nPowerShell is fully documented`n`nThanks for watching`n`n:-)`n`n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$Speed = 250
|
||||||
$Random = New-Object System.Random
|
$Random = New-Object System.Random
|
||||||
|
|
||||||
$message -split '' |
|
$message -split '' |
|
||||||
ForEach-Object {
|
ForEach-Object {
|
||||||
Write-Host $_ -nonew
|
Write-Host -nonewline $_
|
||||||
Start-Sleep -milliseconds $(1 + $Random.Next(250))
|
Start-Sleep -milliseconds $(1 + $Random.Next($Speed))
|
||||||
}
|
}
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user