Advertisement
Guest User

Bevolkingstellerscript Nederland

a guest
Mar 21st, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. $Timestart = Get-date
  2. $TimeEnd = $Timestart.AddHours(8)
  3. Clear-Host
  4.  
  5. $teller=0
  6. Do{
  7. $web = Invoke-WebRequest ("http://www.cbs.nl/nl-nl/menu/themas/bevolking/cijfers/extra/bevolkingsteller.htm")
  8. $data = $web.AllElements | Where{$_.outerText -like "Nederland telt*"} | Select-Object -Expand outertext
  9. $aantal = $data.Substring(16,13)
  10. $teller +=1
  11. $TimeNow = get-date
  12. cls
  13. Write-Host "Bevolkingsteller Nederland"
  14. Write-host "`n `n"
  15. Write-host "Poging $teller `n "
  16. Write-host "Er zijn nu:"
  17. Write-Host -Foreground white -back Red $aantal `n
  18. Write-Host "Inwoners in Nederland"`n`n
  19.  
  20. if ($aantal -like "*17.000.0*"){
  21. Write-host "`n `n"
  22. Write-hOst -foreground blue -back yellow "JAAA 17 miljoen inwoners in Nederland!!!"
  23. Write-host "`n `n"
  24.  
  25. }
  26.  
  27. Write-host "Een moment geduld alstublieft..."
  28. Start-Sleep 5
  29.  
  30. $Timenow = get-date
  31. }
  32. Until ($timeNow -ge $TimeEnd)
  33. Write-host "Pff fuck it, ik heb het $teller keer opgezocht.. Ik ben er klaar mee"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement