AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Control (master) volume with your scrollwheel [VISTA]+[XP]

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
FabianBengtsson



Joined: 14 Nov 2006
Posts: 14

PostPosted: Sat Jul 12, 2008 2:45 pm    Post subject: Control (master) volume with your scrollwheel [VISTA]+[XP] Reply with quote

I noticed that my old script to control the volume in vista did not work properly so I made a rewrite using Vista Audio Control Functions.

Here is the simple script:
Usage:
    Hold the windows button and scroll with the mousewheel to increase or decrease the maste volume.
Script Requirements:

Code:
Code:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir% 
#Include COM.ahk
#Include VA.ahk

stepsize = 5  ; Control the amount of volume increase/decrease

#WheelUp::
    COM_Init()   
    volume := VA_GetMasterVolume()   
   VA_SetMasterVolume(volume+stepsize)
    COM_Term()            
return

#WheelDown::
    COM_Init()
    volume := VA_GetMasterVolume()         
   VA_SetMasterVolume(volume-stepsize)
    COM_Term()
return

XP version
This one also works quite good in vista with XP compatibly mode enabled.
Code:

#WheelDown::SoundSet, -4
return
#WheelUp::SoundSet, +4
return

_________________
Don't capture me again!!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group