mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-24 10:58:16 +02:00
Simple rename
This commit is contained in:
parent
a0e6babacf
commit
2fdd975e96
@ -21,7 +21,7 @@ More supported voice commands are:
|
|||||||
Computer, open `application`
|
Computer, open `application`
|
||||||
----------------------------
|
----------------------------
|
||||||
* launches the given application.
|
* launches the given application.
|
||||||
* replace `application` by: "Calculator", "Git Extensions", "Microsoft Paint", "Netflix", "Notepad", "Outlook", "Paint 3D", "Spotify", "Thunderbird", "Visual Studio", or "Windows Terminal".
|
* replace `application` by: "3D Viewer", "Calculator", "Git Extensions", "Microsoft Paint", "Netflix", "Notepad", "Outlook", "Paint 3D", "Spotify", "Thunderbird", "Visual Studio", or "Windows Terminal".
|
||||||
* when finished say: *Computer, close `application`* to close the application.
|
* when finished say: *Computer, close `application`* to close the application.
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
TaskKill /im Calculator.exe /f /t
|
TaskKill /im Calculator.exe /f /t
|
||||||
if ($lastExitCode -ne "0") {
|
if ($lastExitCode -ne "0") {
|
||||||
& "$PSScriptRoot/speak-english.ps1" "Sorry, no calculator application is running."
|
& "$PSScriptRoot/speak-english.ps1" "Sorry, calculator isn't running."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
TaskKill /im msedge.exe /f /t
|
TaskKill /im msedge.exe /f /t
|
||||||
if ($lastExitCode -ne "0") {
|
if ($lastExitCode -ne "0") {
|
||||||
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close Microsoft Edge"
|
& "$PSScriptRoot/speak-english.ps1" "Sorry, Microsoft Edge isn't running."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
TaskKill /im GitExtensions.exe
|
TaskKill /im GitExtensions.exe
|
||||||
if ($lastExitCode -ne "0") {
|
if ($lastExitCode -ne "0") {
|
||||||
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close Git Extensions"
|
& "$PSScriptRoot/speak-english.ps1" "Sorry, Git Extensions isn't running."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
TaskKill /im mspaint.exe
|
TaskKill /im mspaint.exe
|
||||||
if ($lastExitCode -ne "0") {
|
if ($lastExitCode -ne "0") {
|
||||||
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close Microsoft Paint"
|
& "$PSScriptRoot/speak-english.ps1" "Sorry, Microsoft Paint isn't running."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
TaskKill /im WinStore.App.exe /f /t
|
TaskKill /im WinStore.App.exe /f /t
|
||||||
if ($lastExitCode -ne "0") {
|
if ($lastExitCode -ne "0") {
|
||||||
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close Microsoft Store"
|
& "$PSScriptRoot/speak-english.ps1" "Sorry, Microsoft Store isn't running."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This script closes the Notepad application gracefully.
|
This script closes the Notepad application gracefully.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./close-notepad
|
PS> ./close-note-pad
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
TaskKill /im obs64.exe
|
TaskKill /im obs64.exe
|
||||||
if ($lastExitCode -ne "0") {
|
if ($lastExitCode -ne "0") {
|
||||||
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close OBS Studio"
|
& "$PSScriptRoot/speak-english.ps1" "Sorry, OBS Studio isn't running"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
TaskKill /f /im CalendarApp.Gui.Win10.exe
|
TaskKill /f /im CalendarApp.Gui.Win10.exe
|
||||||
if ($lastExitCode -ne "0") {
|
if ($lastExitCode -ne "0") {
|
||||||
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close OneCalendar"
|
& "$PSScriptRoot/speak-english.ps1" "Sorry, OneCalendar isn't running."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
TaskKill /im outlook.exe
|
TaskKill /im outlook.exe
|
||||||
if ($lastExitCode -ne "0") {
|
if ($lastExitCode -ne "0") {
|
||||||
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close Microsoft Outlook"
|
& "$PSScriptRoot/speak-english.ps1" "Sorry, Microsoft Outlook isn't running."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
TaskKill /im PaintStudio.View.exe /f
|
TaskKill /im PaintStudio.View.exe /f
|
||||||
if ($lastExitCode -ne "0") {
|
if ($lastExitCode -ne "0") {
|
||||||
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close Paint 3D"
|
& "$PSScriptRoot/speak-english.ps1" "Sorry, Paint 3D isn't running."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
@ -38,7 +38,7 @@ try {
|
|||||||
} else {
|
} else {
|
||||||
$Processes = get-process -name $ProgramAliasName -errorAction 'silentlycontinue'
|
$Processes = get-process -name $ProgramAliasName -errorAction 'silentlycontinue'
|
||||||
if ($Processes.Count -eq 0) {
|
if ($Processes.Count -eq 0) {
|
||||||
throw "$FullProgramName is not started yet"
|
throw "$FullProgramName isn't running"
|
||||||
}
|
}
|
||||||
foreach ($Process in $Processes) {
|
foreach ($Process in $Processes) {
|
||||||
$_.CloseMainWindow() | Out-Null
|
$_.CloseMainWindow() | Out-Null
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
TaskKill /im 3DViewer.exe /f
|
TaskKill /im 3DViewer.exe /f
|
||||||
if ($lastExitCode -ne "0") {
|
if ($lastExitCode -ne "0") {
|
||||||
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close 3D Viewer"
|
& "$PSScriptRoot/speak-english.ps1" "Sorry, 3D Viewer isn't running."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
TaskKill /im thunderbird.exe
|
TaskKill /im thunderbird.exe
|
||||||
if ($lastExitCode -ne "0") {
|
if ($lastExitCode -ne "0") {
|
||||||
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close Mozilla Thunderbird"
|
& "$PSScriptRoot/speak-english.ps1" "Sorry, Mozilla Thunderbird isn't running."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
TaskKill /im devenv.exe
|
TaskKill /im devenv.exe
|
||||||
if ($lastExitCode -ne "0") {
|
if ($lastExitCode -ne "0") {
|
||||||
& "$PSScriptRoot/speak-english.ps1" "Sorry, can't close Visual Studio"
|
& "$PSScriptRoot/speak-english.ps1" "Sorry, Visual Studio isn't running."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Opens a Notepad website
|
Opens the Notepad website
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This script launches the Web browser with a Notepad website.
|
This script launches the Web browser with the Notepad website.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./open-notepad-website
|
PS> ./open-note-pad-website
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This script launches the Notepad application.
|
This script launches the Notepad application.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./open-notepad
|
PS> ./open-note-pad
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
Loading…
Reference in New Issue
Block a user