aboutsummaryrefslogtreecommitdiff
path: root/tt.volume.ahk
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2020-12-01 22:42:41 +0100
committerJohn Ankarström <john@ankarstrom.se>2020-12-01 22:42:41 +0100
commit6348db6799aede103ed69522affc79411cb67e1c (patch)
treeb8a4cb85f9e6dfd28dececdc8a979f532d4f6d48 /tt.volume.ahk
parentd8c55b56e139a1b624f25345dc616c9f610deea6 (diff)
downloadahk-6348db6799aede103ed69522affc79411cb67e1c.tar.gz
Switch from spaces to tabswindowsxp
Diffstat (limited to 'tt.volume.ahk')
-rw-r--r--tt.volume.ahk92
1 files changed, 46 insertions, 46 deletions
diff --git a/tt.volume.ahk b/tt.volume.ahk
index 59d16a7..e01be7d 100644
--- a/tt.volume.ahk
+++ b/tt.volume.ahk
@@ -13,53 +13,53 @@ 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, w, WAVE
+ SoundSet, 15
+ w := round(w) + n
+ if (w > 100)
+ w := 100
+ if (w < 0)
+ w := 0
+ SoundSet, %w%, WAVE
+ OSD(w)
}
/*
SetVolume(n)
{
- global wMax
- static vMin := 4
-
- SoundGet, s
- SoundGet, w, WAVE
- s := round(s)
- w := round(w)
-
- if (s > vMin or w > wMax)
- wMax := w
- else if (wMax = "")
- wMax := 100
-
- v := s + w - wMax + n
-
- if (v > 100)
- v := 100
-
- if (v >= vMin)
- {
- s := v
- w := wMax
- }
- else
- {
- s := vMin
- w := wMax - vMin + v
- }
-
- SoundSet, %s%
- SoundSet, %w%, WAVE
- OSD(v) ; display volume on screen
+ global wMax
+ static vMin := 4
+
+ SoundGet, s
+ SoundGet, w, WAVE
+ s := round(s)
+ w := round(w)
+
+ if (s > vMin or w > wMax)
+ wMax := w
+ else if (wMax = "")
+ wMax := 100
+
+ v := s + w - wMax + n
+
+ if (v > 100)
+ v := 100
+
+ if (v >= vMin)
+ {
+ s := v
+ w := wMax
+ }
+ else
+ {
+ s := vMin
+ w := wMax - vMin + v
+ }
+
+ SoundSet, %s%
+ SoundSet, %w%, WAVE
+ OSD(v) ; display volume on screen
}
*/
@@ -80,11 +80,11 @@ Gui, OSD:Show, x0 y%y% AutoSize NA, OSD
OSD(text)
{
- SetTimer, RemoveOSD, Off
- WinSet, AlwaysOnTop, On, OSD
- GuiControl, OSD:Text, OSD, %text%
- SetTimer, RemoveOSD, 3000
- return
+ SetTimer, RemoveOSD, Off
+ WinSet, AlwaysOnTop, On, OSD
+ GuiControl, OSD:Text, OSD, %text%
+ SetTimer, RemoveOSD, 3000
+ return
}
RemoveOSD: