From 6e1a1897e890846e56b5bc679a6ef23becb96a21 Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 19 Oct 2021 17:35:54 +0200 Subject: [PATCH] Improve turn-volume-up.ps1 and turn-volume-down.ps1 --- Scripts/turn-volume-down.ps1 | 3 ++- Scripts/turn-volume-up.ps1 | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Scripts/turn-volume-down.ps1 b/Scripts/turn-volume-down.ps1 index 6a643347..ea53017d 100755 --- a/Scripts/turn-volume-down.ps1 +++ b/Scripts/turn-volume-down.ps1 @@ -20,7 +20,8 @@ try { for ([int]$i = 0; $i -lt $percent; $i += 2) { $obj.SendKeys([char]174) # each tick is -2% } - "🔉️ volume -$($percent)%" + "🔉️ -$($percent)%" + & "$PSScriptRoot/speak-english.ps1" "OK, $percent percent less volume" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/turn-volume-up.ps1 b/Scripts/turn-volume-up.ps1 index f184821b..f03dc1d4 100755 --- a/Scripts/turn-volume-up.ps1 +++ b/Scripts/turn-volume-up.ps1 @@ -20,7 +20,8 @@ try { for ([int]$i = 0; $i -lt $percent; $i += 2) { $obj.SendKeys([char]175) # each tick is +2% } - "🔊️ volume +$($percent)%" + "🔊️ +$($percent)%" + & "$PSScriptRoot/speak-english.ps1" "OK, $percent percent louder" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"