Guest User

Untitled

a guest
Jul 12th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. function Write-HostSimType ($output){
  2. $array = $output.ToCharArray()
  3. foreach ($l in $array){
  4. $delay = 30
  5. if (@(",",".","?","!",":",";") -Contains $l){
  6. $delay = 300
  7. } elseif ($l -Match "`b" ){
  8. $l = "`b `b"
  9. }
  10. Write-Host -NoNewLine $l
  11. Start-Sleep -Milliseconds $delay
  12. }
  13. Write-Host ""
  14. }
  15.  
  16. function New-BackspaceLn ($in){
  17. $bs = "`b" * $in.Length
  18. return "$in$bs"
  19. }
  20.  
  21. $initial = New-BackspaceLn "Greetings commander, let's make this quick."
  22. Write-HostSimType "$($initial)But first, how are you doing?"
Add Comment
Please, Sign In to add comment