---------------------------------------------------------------------------------
########################################
# Funscript.ps1 #
# http://imjustanengineer.blogspot.com #
# Written by DJ 3/2014 #########################################
Add-Type -AssemblyName System.Speech
$synthesizer = New-Object -TypeName System.Speech.Synthesis.SpeechSynthesizer
Write-Host This script will tell you how old you will be in $year and will speak to you. Make sure your speakers are on.;
$synthesizer.Speak("This script will tell how old you will be in ($year) and will speak to you. Make sure your speakers are on. ") | Out-Null
$name = Read-Host 'What is your name?';
$synthesizer.Speak("Hello, ($name) ,!") | Out-Null
$yb = Read-Host 'What year were you born?';
$synthesizer.Speak("Thank you, ($name) ,") | Out-Null
$date = Get-Date;
$year = + $date.Year;
$today = Get-Date -Format D;
$span = $year - $yb;
Write-Host Hello, $name. Today is $today. You will be $span years old this year. When is the party?;
$synthesizer.Speak("Hello, ($name). Today is ($today). You will be ($span) years old this year. When is the partee? ") | Out-Null
[System.Console]::Beep(262,200)
[System.Console]::Beep(262,200)
[System.Console]::Beep(294,200)
[System.Console]::Beep(262,200)
[System.Console]::Beep(349,200)
[System.Console]::Beep(330,200)
[System.Console]::Beep(262,200)
[System.Console]::Beep(262,200)
[System.Console]::Beep(294,200)
[System.Console]::Beep(262,200)
[System.Console]::Beep(392,200)
[System.Console]::Beep(349,200)
[System.Console]::Beep(262,200)
[System.Console]::Beep(262,200)
[System.Console]::Beep(482,200)
[System.Console]::Beep(440,200)
[System.Console]::Beep(349,200)
[System.Console]::Beep(330,200)
[System.Console]::Beep(294,200)
[System.Console]::Beep(482,200)
[System.Console]::Beep(482,200)
[System.Console]::Beep(440,200)
[System.Console]::Beep(349,200)
[System.Console]::Beep(392,200)
[System.Console]::Beep(349,200)
I would like to see what you can come up with. Be sure to leave your comments and suggestions below.
No comments:
Post a Comment