mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-09 05:04:39 +02:00
Improved the scripts
This commit is contained in:
@ -6,13 +6,13 @@
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param([string]$Text = "")
|
||||
param($Text = "")
|
||||
|
||||
if ($Text -eq "") {
|
||||
$Text = read-host "Enter the text to speak"
|
||||
}
|
||||
|
||||
try {
|
||||
if ($Text -eq "") {
|
||||
$Text = read-host "Enter the text to speak"
|
||||
}
|
||||
|
||||
$Voice = new-object -ComObject SAPI.SPVoice
|
||||
$Result = $Voice.Speak($Text)
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user