Change to use speak-english.ps1

This commit is contained in:
Markus Fleschutz 2022-11-18 16:49:17 +01:00
parent 470b6a25b3
commit 7c1e83cbd7
24 changed files with 27 additions and 27 deletions

View File

@ -13,7 +13,7 @@
TaskKill /im Calculator.exe /f /t
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/give-reply.ps1" "Sorry, calculator isn't running."
& "$PSScriptRoot/speak-english.ps1" "Sorry, calculator isn't running."
exit 1
}
exit 0 # success

View File

@ -13,7 +13,7 @@
TaskKill /im msedge.exe /f /t
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/give-reply.ps1" "Sorry, Microsoft Edge isn't running."
& "$PSScriptRoot/speak-english.ps1" "Sorry, Microsoft Edge isn't running."
exit 1
}
exit 0 # success

View File

@ -13,7 +13,7 @@
TaskKill /im GitExtensions.exe
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/give-reply.ps1" "Sorry, Git Extensions isn't running."
& "$PSScriptRoot/speak-english.ps1" "Sorry, Git Extensions isn't running."
exit 1
}
exit 0 # success

View File

@ -13,7 +13,7 @@
TaskKill /im mspaint.exe
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/give-reply.ps1" "Sorry, Microsoft Paint isn't running."
& "$PSScriptRoot/speak-english.ps1" "Sorry, Microsoft Paint isn't running."
exit 1
}
exit 0 # success

View File

@ -13,7 +13,7 @@
TaskKill /im WinStore.App.exe /f /t
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/give-reply.ps1" "Sorry, Microsoft Store isn't running."
& "$PSScriptRoot/speak-english.ps1" "Sorry, Microsoft Store isn't running."
exit 1
}
exit 0 # success

View File

@ -13,7 +13,7 @@
TaskKill /im obs64.exe
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/give-reply.ps1" "Sorry, OBS Studio isn't running"
& "$PSScriptRoot/speak-english.ps1" "Sorry, OBS Studio isn't running"
exit 1
}
exit 0 # success

View File

@ -13,7 +13,7 @@
TaskKill /f /im CalendarApp.Gui.Win10.exe
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/give-reply.ps1" "Sorry, OneCalendar isn't running."
& "$PSScriptRoot/speak-english.ps1" "Sorry, OneCalendar isn't running."
exit 1
}
exit 0 # success

View File

@ -13,7 +13,7 @@
TaskKill /im outlook.exe
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/give-reply.ps1" "Sorry, Microsoft Outlook isn't running."
& "$PSScriptRoot/speak-english.ps1" "Sorry, Microsoft Outlook isn't running."
exit 1
}
exit 0 # success

View File

@ -13,7 +13,7 @@
TaskKill /im PaintStudio.View.exe /f
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/give-reply.ps1" "Sorry, Paint 3D isn't running."
& "$PSScriptRoot/speak-english.ps1" "Sorry, Paint 3D isn't running."
exit 1
}
exit 0 # success

View File

@ -13,7 +13,7 @@
TaskKill /im 3DViewer.exe /f
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/give-reply.ps1" "Sorry, 3D Viewer isn't running."
& "$PSScriptRoot/speak-english.ps1" "Sorry, 3D Viewer isn't running."
exit 1
}
exit 0 # success

View File

@ -13,7 +13,7 @@
TaskKill /im thunderbird.exe
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/give-reply.ps1" "Sorry, Mozilla Thunderbird isn't running."
& "$PSScriptRoot/speak-english.ps1" "Sorry, Mozilla Thunderbird isn't running."
exit 1
}
exit 0 # success

View File

@ -13,7 +13,7 @@
TaskKill /im devenv.exe
if ($lastExitCode -ne "0") {
& "$PSScriptRoot/give-reply.ps1" "Sorry, Visual Studio isn't running."
& "$PSScriptRoot/speak-english.ps1" "Sorry, Visual Studio isn't running."
exit 1
}
exit 0 # success

View File

@ -29,7 +29,7 @@ try {
for( $i = 0; $i -lt $keyPresses; $i++ ) {
$obj.SendKeys( [char] 175 )
}
& "$PSScriptRoot/give-reply.ps1" "$($Volume)% volume."
& "$PSScriptRoot/speak-english.ps1" "$($Volume)% volume."
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -25,8 +25,8 @@ try {
if ($Line -like "HEAD*") { & "$PSScriptRoot/write-big.ps1" "$($Line.substring(5))"; continue }
""
& "$PSScriptRoot/give-reply.ps1" "$($Step). $Line"
$Dummy = read-host " Say <Check> or press <Return> to continue"
& "$PSScriptRoot/speak-english.ps1" "$($Step). $Line"
$Dummy = Read-Host " Say <Check> or press <Return> to continue"
$Step++
}
exit 0 # success

View File

@ -17,10 +17,10 @@ param([int]$StartNumber = 10)
try {
for ([int]$i = $StartNumber; $i -gt 0; $i--) {
& "$PSScriptRoot/give-reply.ps1" $i
& "$PSScriptRoot/speak-english.ps1" $i
start-sleep -milliseconds 200
}
& "$PSScriptRoot/give-reply.ps1" "zero"
& "$PSScriptRoot/speak-english.ps1" "zero"
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -24,7 +24,7 @@ try {
$Reply += $Char
$Reply += " "
}
& "$PSScriptRoot/give-reply.ps1" "$Reply"
& "$PSScriptRoot/speak-english.ps1" "$Reply"
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -18,9 +18,9 @@ try {
$Index = [int]$Generator.next(0, $Table.Count - 1)
$Reply = $Table[$Index].Joke
& "$PSScriptRoot/give-reply.ps1" "$Reply"
& "$PSScriptRoot/speak-english.ps1" "$Reply"
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}
}

View File

@ -20,7 +20,7 @@ try {
$Author = $Table[$Index].Author
$Reply = "$Quote (by $Author)"
& "$PSScriptRoot/give-reply.ps1" "$Reply"
& "$PSScriptRoot/speak-english.ps1" "$Reply"
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -20,7 +20,7 @@ try {
for ([int]$i = 0; $i -lt $percent; $i += 2) {
$obj.SendKeys([char]174) # each tick is -2%
}
& "$PSScriptRoot/give-reply.ps1" "$($percent)% softer."
& "$PSScriptRoot/speak-english.ps1" "$($percent)% softer."
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -16,7 +16,7 @@ try {
for ([int]$i = 0; $i -lt 100; $i += 2) {
$obj.SendKeys([char]175) # each tick is +2%
}
& "$PSScriptRoot/give-reply.ps1" "Hundred percent now."
& "$PSScriptRoot/speak-english.ps1" "Hundred percent now."
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -14,7 +14,7 @@
try {
$obj = new-object -com wscript.shell
$obj.SendKeys([char]173)
& "$PSScriptRoot/give-reply.ps1" "Audio is off."
& "$PSScriptRoot/speak-english.ps1" "Audio is off."
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -14,7 +14,7 @@
try {
$obj = new-object -com wscript.shell
$obj.SendKeys([char]173)
& "$PSScriptRoot/give-reply.ps1" "Audio is on."
& "$PSScriptRoot/speak-english.ps1" "Audio is on."
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -20,7 +20,7 @@ try {
for ([int]$i = 0; $i -lt $percent; $i += 2) {
$obj.SendKeys([char]175) # each tick is +2%
}
& "$PSScriptRoot/give-reply.ps1" "$($percent)% louder."
& "$PSScriptRoot/speak-english.ps1" "$($percent)% louder."
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -16,7 +16,7 @@
param([string]$abbreviation = "")
function Reply { param([string]$Text)
& "$PSScriptRoot/give-reply.ps1" "$Text"
& "$PSScriptRoot/speak-english.ps1" "$Text"
}
try {