mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-22 20:51:17 +01:00
Fixed typo
This commit is contained in:
parent
943752b6b7
commit
21a23422e1
@ -10,12 +10,12 @@ param([string]$File)
|
||||
|
||||
try {
|
||||
if ($File -eq "") {
|
||||
$File = read-host "Enter path to file"
|
||||
$File = read-host "Enter path to text file"
|
||||
}
|
||||
$Text = Get-Content $File
|
||||
|
||||
$voice = New-Object ComObject SAPI.SPVoice
|
||||
$voice.Speak($Text);
|
||||
$Voice = new-object -ComObject SAPI.SPVoice
|
||||
$Result = $Voice.Speak($Text)
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user