mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-11 21:59:11 +02:00
Add datatype to param()
This commit is contained in:
@ -11,10 +11,11 @@
|
||||
Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param($Text = "")
|
||||
if ("$Text" -eq "") { $Text = read-host "Enter the text to speak" }
|
||||
param([string]$Text = "")
|
||||
|
||||
try {
|
||||
if ("$Text" -eq "") { $Text = read-host "Enter the text to speak" }
|
||||
|
||||
$Voice = new-object -ComObject SAPI.SPVoice
|
||||
$Voices = $Voice.GetVoices()
|
||||
foreach ($OtherVoice in $Voices) {
|
||||
|
Reference in New Issue
Block a user