mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-23 06:08:36 +01:00
Merge branch 'master' of github.com:fleschutz/PowerShell
This commit is contained in:
commit
7a11e4705a
@ -5,7 +5,6 @@
|
||||
This PowerShell script plays a short beep sound.
|
||||
.EXAMPLE
|
||||
PS> ./play-beep-sound
|
||||
(listen and enjoy)
|
||||
.NOTES
|
||||
Author: Markus Fleschutz / License: CC0
|
||||
.LINK
|
||||
|
@ -1,8 +1,8 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Turns the audio volume down (-10% by default)
|
||||
Turns the volume down
|
||||
.DESCRIPTION
|
||||
This PowerShell script turns the audio volume down (by -10% by default).
|
||||
This PowerShell script turns the audio volume down (-10% by default).
|
||||
.PARAMETER percent
|
||||
Specifies the percent number
|
||||
.EXAMPLE
|
||||
@ -10,7 +10,7 @@
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
Author: Markus Fleschutz / License: CC0
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
param([int]$percent = 10)
|
||||
@ -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)% less volume"
|
||||
& "$PSScriptRoot/give-reply.ps1" "$($percent)% softer."
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Turns the volume off
|
||||
Turn audio off
|
||||
.DESCRIPTION
|
||||
This PowerShell script mutes the default audio device immediately.
|
||||
.EXAMPLE
|
||||
@ -8,7 +8,7 @@
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
Author: Markus Fleschutz / License: CC0
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
|
@ -1,14 +1,14 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Turns the volume on
|
||||
Turn audio on
|
||||
.DESCRIPTION
|
||||
This PowerShell script unmutes the audio output.
|
||||
This PowerShell script immediately unmutes the audio output.
|
||||
.EXAMPLE
|
||||
PS> .\turn-volume-on
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
Author: Markus Fleschutz / License: CC0
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
|
@ -1,8 +1,8 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Turns the audio volume up
|
||||
Turns the volume up
|
||||
.DESCRIPTION
|
||||
This PowerShell script turns the audio volume up (by +10% by default)
|
||||
This PowerShell script turns the audio volume up (+10% by default).
|
||||
.PARAMETER percent
|
||||
Specifies the percent number
|
||||
.EXAMPLE
|
||||
@ -10,7 +10,7 @@
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
Author: Markus Fleschutz / License: CC0
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
param([int]$percent = 10)
|
||||
@ -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" "OK, $($percent)% louder."
|
||||
& "$PSScriptRoot/give-reply.ps1" "$($percent)% louder."
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||
|
Loading…
Reference in New Issue
Block a user