mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-09 18:19:32 +02:00
Add open-screen-magnifier.ps1 and close-screen-magnifier.ps1
This commit is contained in:
parent
2853cfdd3b
commit
98ac588a23
15
Scripts/close-screen-magnifier.ps1
Executable file
15
Scripts/close-screen-magnifier.ps1
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Closes the Screen Magnifier
|
||||||
|
.DESCRIPTION
|
||||||
|
This script closes the Windows Screen Magnifier application gracefully.
|
||||||
|
.EXAMPLE
|
||||||
|
PS> ./close-screen-magnifier
|
||||||
|
.NOTES
|
||||||
|
Author: Markus Fleschutz · License: CC0
|
||||||
|
.LINK
|
||||||
|
https://github.com/fleschutz/PowerShell
|
||||||
|
#>
|
||||||
|
|
||||||
|
& "$PSScriptRoot/close-program.ps1" "Screen Magnifier" "magnify.exe" ""
|
||||||
|
exit 0 # success
|
20
Scripts/open-screen-magnifier.ps1
Executable file
20
Scripts/open-screen-magnifier.ps1
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Launch the Screen Magnifier
|
||||||
|
.DESCRIPTION
|
||||||
|
This script launches the Windows Screen Magnifier application.
|
||||||
|
.EXAMPLE
|
||||||
|
PS> ./open-screen-magnifier
|
||||||
|
.NOTES
|
||||||
|
Author: Markus Fleschutz · License: CC0
|
||||||
|
.LINK
|
||||||
|
https://github.com/fleschutz/PowerShell
|
||||||
|
#>
|
||||||
|
|
||||||
|
try {
|
||||||
|
start-process magnify.exe
|
||||||
|
exit 0 # success
|
||||||
|
} catch {
|
||||||
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||||
|
exit 1
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user