daily pastebin goal
46%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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?"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top