mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-09 18:19:32 +02:00
Update turn-volume-up.ps1
This commit is contained in:
parent
b2a16c4e5c
commit
12639db861
@ -1,8 +1,8 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Turns the audio volume up
|
Turns the volume up
|
||||||
.DESCRIPTION
|
.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
|
.PARAMETER percent
|
||||||
Specifies the percent number
|
Specifies the percent number
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
@ -10,7 +10,7 @@
|
|||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz / License: CC0
|
Author: Markus Fleschutz | License: CC0
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param([int]$percent = 10)
|
param([int]$percent = 10)
|
||||||
@ -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]175) # each tick is +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
|
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