mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-09 18:19:32 +02:00
Update turn-volume-down.ps1
This commit is contained in:
parent
12639db861
commit
f09438bc6f
@ -1,8 +1,8 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Turns the audio volume down
|
Turns the volume down
|
||||||
.DESCRIPTION
|
.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
|
.PARAMETER percent
|
||||||
Specifies the percent number
|
Specifies the percent number
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
@ -20,7 +20,7 @@ try {
|
|||||||
for ([int]$i = 0; $i -lt $percent; $i += 2) {
|
for ([int]$i = 0; $i -lt $percent; $i += 2) {
|
||||||
$obj.SendKeys([char]174) # each tick is -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
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||||
|
Loading…
Reference in New Issue
Block a user