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 

Some volume control hotkeys

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



Joined: 04 Mar 2004
Posts: 7

PostPosted: Mon Mar 29, 2004 2:21 pm    Post subject: Some volume control hotkeys Reply with quote

My script for volume control hotkeys
* winkey-up/down adjusts main volume
* ctrl-winkey-up/down adjusts wave volume
* winkey and both up and down key simultaneously open/closes the volume control panel

#Up::
GetKeyState, state, Down, P
if state = D
{
Gosub, ToggleVolumeControlPanel
}
SoundSet, +10
return

#Down::
GetKeyState, state, Up, P
if state = D
{
Gosub, ToggleVolumeControlPanel
}
SoundSet, -10
return

^#Up::
SoundSet, +10, WAVE
return

^#Down::
SoundSet, -10, WAVE
return

ToggleVolumeControlPanel:
IfWinActive, Volume Control
{
WinClose
return
}
IfWinExist, Volume Control
{
WinActivate
}
else
{
Run, sndvol32
}
return


/Peter A
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Mon Mar 29, 2004 2:44 pm    Post subject: Reply with quote

That's very nice; I especially like how you've made the hotkeys multi-purpose by doing something different whenever a 3rd key is being held down.
Back to top
View user's profile Send private message Send e-mail
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