AutoHotkey Community

It is currently May 26th, 2012, 9:02 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: July 12th, 2008, 3:45 pm 
Offline

Joined: November 14th, 2006, 4:40 pm
Posts: 16
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!!


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Stigg, tomoe_uehara and 14 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group