From ba17c231db9b21532ff990fc92db34fb46758ef0 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Sat, 23 Oct 2021 16:53:41 +0200 Subject: [PATCH] Add open-snipping-tool.ps1 and close-snipping-tool.ps1 --- Data/scripts.csv | 2 ++ Docs/close-snipping-tool.md | 26 ++++++++++++++++++++++++++ Docs/open-snipping-tool.md | 26 ++++++++++++++++++++++++++ README.md | 2 ++ Scripts/close-snipping-tool.ps1 | 15 +++++++++++++++ Scripts/open-snipping-tool.ps1 | 15 +++++++++++++++ 6 files changed, 86 insertions(+) create mode 100644 Docs/close-snipping-tool.md create mode 100644 Docs/open-snipping-tool.md create mode 100755 Scripts/close-snipping-tool.ps1 create mode 100755 Scripts/open-snipping-tool.ps1 diff --git a/Data/scripts.csv b/Data/scripts.csv index f45d5244..c9327e40 100644 --- a/Data/scripts.csv +++ b/Data/scripts.csv @@ -50,6 +50,7 @@ close-firefox.ps1, Closes the Firefox Web browser close-program.ps1, Closes the given program gracefully close-netflix.ps1, Closes the Netflix application gracefully close-onedrive.ps1, Closes Microsoft OneDrive gracefully +close-snipping-tool.ps1, Closes the Snipping Tool application gracefully close-system-settings.ps1, Closes the System Settings gracefully close-thunderbird.ps1, Closes Mozilla Thunderbird gracefully close-vlc.ps1, Closes the VLC media player application @@ -170,6 +171,7 @@ open-notepad.ps1, Starts the Notepad app open-onedrive-folder.ps1, Opens the user's OneDrive folder open-recycle-bin.ps1, Opens the user's recycle bin folder open-repos-folder.ps1, Opens the user's Git repositories folder +open-snipping-tools.ps1, Opens the Snipping Tool open-task-manager.ps1, Starts the Task Manager open-videos-folder.ps1, Opens the user's videos folder pick-commit.ps1, Cherry-picks a Git commit into multiple branches diff --git a/Docs/close-snipping-tool.md b/Docs/close-snipping-tool.md new file mode 100644 index 00000000..64d3a670 --- /dev/null +++ b/Docs/close-snipping-tool.md @@ -0,0 +1,26 @@ +## close-snipping-tool.ps1 - Closes the Snipping Tool + +This script closes the Snipping Tool application gracefully. + +## Parameters +```powershell +close-snipping-tool.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Example +```powershell +PS> ./close-snipping-tool + +``` + +## Notes +Author: Markus Fleschutz · License: CC0 + +## Related Links +https://github.com/fleschutz/PowerShell + +*Generated by convert-ps2md.ps1 using the comment-based help of close-snipping-tool.ps1* diff --git a/Docs/open-snipping-tool.md b/Docs/open-snipping-tool.md new file mode 100644 index 00000000..42406439 --- /dev/null +++ b/Docs/open-snipping-tool.md @@ -0,0 +1,26 @@ +## open-snipping-tool.ps1 - Starts the Snipping Tool + +This script starts the Snipping Tool application. + +## Parameters +```powershell +open-snipping-tool.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Example +```powershell +PS> ./open-snipping-tool + +``` + +## Notes +Author: Markus Fleschutz · License: CC0 + +## Related Links +https://github.com/fleschutz/PowerShell + +*Generated by convert-ps2md.ps1 using the comment-based help of open-snipping-tool.ps1* diff --git a/README.md b/README.md index 079d22b9..140f5b89 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,7 @@ Mega Collection of PowerShell Scripts | [close-program.ps1](Scripts/close-program.ps1) | Closes the given program gracefully | [Help](Docs/close-program.md) | | [close-netflix.ps1](Scripts/close-netflix.ps1) | Closes the Netflix application | [Help](Docs/close-netflix.md) | | [close-onedrive.ps1](Scripts/close-onedrive.ps1) | Closes Microsoft OneDrive | [Help](Docs/close-onedrive.md) | +| [close-snipping-tool.ps1](Scripts/close-snipping-tool.ps1)| Closes the Snipping Tool application | [Help](Docs/close-snipping-tool.md) | | [close-system-settings.ps1](Scripts/close-system-settings.ps1) | Closes the System Settings window | [Help](Docs/close-system-settings.md)| | [close-task-manager.ps1](Scripts/close-task-manager.ps1) | Closes the Task Manager | [Help](Docs/close-task-manager.md) | | [close-thunderbird.ps1](Scripts/close-thunderbird.ps1) | Closes Mozilla Thunderbird | [Help](Docs/close-thunderbird.md) | @@ -125,6 +126,7 @@ Mega Collection of PowerShell Scripts | [open-onedrive-folder.ps1](Scripts/open-onedrive-folder.ps1)| Opens the user's OneDrive folder | [Help](Docs/open-onedrive-folder.md) | | [open-recycle-bin.ps1](Scripts/open-recycle-bin.ps1) | Opens the user's recycle bin folder | [Help](Docs/open-recycle-bin.md) | | [open-repos-folder.ps1](Scripts/open-repos-folder.ps1) | Opens the user's Git repositories folder | [Help](Docs/open-repos-folder.md) | +| [open-snipping-tool.ps1](Scripts/open-snipping-tool.ps1)| Starts the Snipping Tool | [Help](Docs/open-snipping-tool.md) | | [open-task-manager.ps1](Scripts/open-task-manager.ps1)| Starts the Task Manager | [Help](Docs/open-task-manager.md) | | [open-videos-folder.ps1](Scripts/open-videos-folder.ps1)| Opens the user's videos folder | [Help](Docs/open-videos-folder.md) | | [remind-me.ps1](Scripts/remind-me.ps1) | Creates a scheduled task that will display a popup message | [Help](Docs/remind-me.md) | diff --git a/Scripts/close-snipping-tool.ps1 b/Scripts/close-snipping-tool.ps1 new file mode 100755 index 00000000..76be25e4 --- /dev/null +++ b/Scripts/close-snipping-tool.ps1 @@ -0,0 +1,15 @@ +<# +.SYNOPSIS + Closes the Snipping Tool +.DESCRIPTION + This script closes the Snipping Tool application gracefully. +.EXAMPLE + PS> ./close-snipping-tool +.NOTES + Author: Markus Fleschutz · License: CC0 +.LINK + https://github.com/fleschutz/PowerShell +#> + +& "$PSScriptRoot/close-program.ps1" "Snipping Tool" "SnippingTool.exe" "" +exit 0 # success diff --git a/Scripts/open-snipping-tool.ps1 b/Scripts/open-snipping-tool.ps1 new file mode 100755 index 00000000..6c862ba3 --- /dev/null +++ b/Scripts/open-snipping-tool.ps1 @@ -0,0 +1,15 @@ +<# +.SYNOPSIS + Starts the Snipping Tool +.DESCRIPTION + This script starts the Snipping Tool application. +.EXAMPLE + PS> ./open-snipping-tool +.NOTES + Author: Markus Fleschutz · License: CC0 +.LINK + https://github.com/fleschutz/PowerShell +#> + +Start-Process SnippingTool.exe +exit 0 # success