diff options
author | John Ankarström <john@ankarstrom.se> | 2020-12-01 23:18:35 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-12-02 12:21:06 +0100 |
commit | e831a7416ba2dd1f342e710c6048c8fa97291d93 (patch) | |
tree | 662971d52d8c5380de8417bea9368d7d25aa4644 /tt.volume.ahk | |
parent | 6348db6799aede103ed69522affc79411cb67e1c (diff) | |
download | ahk-e831a7416ba2dd1f342e710c6048c8fa97291d93.tar.gz |
Switch to Windows 7
Diffstat (limited to 'tt.volume.ahk')
-rw-r--r-- | tt.volume.ahk | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tt.volume.ahk b/tt.volume.ahk index e01be7d..5946469 100644 --- a/tt.volume.ahk +++ b/tt.volume.ahk @@ -13,15 +13,14 @@ RAlt & F5::SetVolume(GetKeyState("Shift") ? -2 : -1) SetVolume(n) { - SoundGet, w, WAVE - SoundSet, 15 - w := round(w) + n - if (w > 100) - w := 100 - if (w < 0) - w := 0 - SoundSet, %w%, WAVE - OSD(w) + SoundGet, s + s := round(s) + n + if (s > 100) + s := 100 + if (s < 0) + s := 0 + SoundSet, %s% + OSD(s) } /* |