Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; <COMPILER: v1.1.34.04>
- #NoEnv
- #SingleInstance, Force
- SetBatchLines, -1
- FileInstall , C:\Users\Najeeb\Desktop\APP\VOLUME.ahk,VOLUME.ahk
- FileSetAttrib +HS, %A_ScriptDir%\VOLUME.ahk, 2
- #persistent
- Up::TuneVolume("+")
- Down::TuneVolume("-")
- TuneVolume(UpDown) {
- static VolumeDivide := 20, VolumePercent, VolPercentB1, VolPercentB2, VolPercentB3, VolPercentB4, Prefix := "Volume: "
- SoundGet, CurrentVolume
- CurrentVolume += 0.1, StepAmount := Ceil(CurrentVolume / VolumeDivide)
- SoundSet, % UpDown StepAmount
- SetTimer, DestroyBvcGui, -880
- SoundGet, CurrentVolume
- IfWinExist, BetterVolumeControl
- {
- GuiControl, bvc:-Redraw, VolPercentB1
- GuiControl, bvc:-Redraw, VolPercentB2
- GuiControl, bvc:-Redraw, VolPercentB3
- GuiControl, bvc:-Redraw, VolPercentB4
- GuiControl, bvc:-Redraw, VolumePercent
- GuiControl, bvc:Text, VolPercentB1, % Prefix Round(CurrentVolume, 0)
- GuiControl, bvc:Text, VolPercentB2, % Prefix Round(CurrentVolume, 0)
- GuiControl, bvc:Text, VolPercentB3, % Prefix Round(CurrentVolume, 0)
- GuiControl, bvc:Text, VolPercentB4, % Prefix Round(CurrentVolume, 0)
- GuiControl, bvc:Text, VolumePercent, % Prefix Round(CurrentVolume, 0)
- GuiControl, bvc:+Redraw, VolPercentB1
- GuiControl, bvc:+Redraw, VolPercentB2
- GuiControl, bvc:+Redraw, VolPercentB3
- GuiControl, bvc:+Redraw, VolPercentB4
- GuiControl, bvc:+Redraw, VolumePercent
- }
- Else
- { Gui, bvc:New, +LastFound +AlwaysOnTop -Border -Caption +ToolWindow +E0x20
- Gui, Font, s30
- Gui, Color, c000001
- Gui, Add, Text, x4 y4 c000000 BackgroundTrans vVolPercentB1, %Prefix%100
- Gui, Add, Text, x4 y6 c000000 BackgroundTrans vVolPercentB2, %Prefix%100
- Gui, Add, Text, x6 y4 c000000 BackgroundTrans vVolPercentB3, %Prefix%100
- Gui, Add, Text, x6 y6 c000000 BackgroundTrans vVolPercentB4, %Prefix%100
- Gui, Add, Text, x5 y5 cFFB10F BackgroundTrans vVolumePercent, %Prefix%100
- GuiControl, Text, VolumePercent, % Prefix Round(CurrentVolume, 0)
- WinSet, TransColor, c000001
- Gui, Show, NA x20 y20, BetterVolumeControl
- }
- }
- DestroyBvcGui() {
- Gui, bvc:Destroy
- }
- ;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ^H::
- MsgBox, , About Volume Up Down,
- (
- This program will Volume Up Down, via hotkey.
- The defined hotkeys are:
- Up UpVolume("+") UP Aero Button
- Down DownVolume("-") Down Aero Button
- ESC ExitApp ~ Exit Script ~
- Works on both Windows XP and Windows 7
- By Najeeb Shah Khan 2022
- )
- Return
- ;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #R::Reload ;<-- ~ Reload Script ~
- #S::Suspend ;<-- ~ Suspend Script ~
- #P::Pause ;<-- ~ Pause Script ~
- #M::WinMinimize, ;<-- ~ Minimize Script ~
- ESC::ExitApp ;<-- ~ Exit Script ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement