4

I am working at a script in AutoHotkey to allow me to control my computer's volume with my Dell AT101W keyboard (since there are no keys set in Windows to control such things and this keyboard doesn't have controls programmed into it).

What I have so far:

^!(whatever the up arrow is) ; What is up?
     SoundSet +2
^!(whatever the down arrow is) ; What is down?
     SoundSet -2

I am not entirely sure if I have the volume commands correct there, but I have absolutely no idea how to make it recognize the up and down arrow keystrokes (I don't know what they are). Example scripts are appreciated, but are in no way necessary.

Jim Adams
  • 53
  • 4

1 Answers1

5

It's actually pretty easy, it's just Up and Down.

Here is a working script that sets a tray message balloon informing you of the new volume after changing it:

^!Up::
     SoundSet +2
     GoSub DisplayCurrentVolume
     Return
^!Down:: 
     SoundSet -2
     GoSub DisplayCurrentVolume
     Return

DisplayCurrentVolume:
     SoundGet, volume
     volume := Ceil(volume) ; Round up
     TrayTip, Volume Adjusted, Volume changed to %volume%`%, 5, 1
     Return
GregL
  • 37,147
  • 8
  • 62
  • 67
  • Well, it does actually do something, but I don't think I had it right when I used "SoundSet" because it doesn't appear to be doing anything with my actual system volume. However, this did answer my question as far as using keys, so for that I thank you. – Jim Adams Nov 11 '14 at 01:31
  • Please try the newest release of autohotkey from http://ahkscript.org as there has been fixes to some of the Sound functions not too long ago. – blackholyman Nov 11 '14 at 21:34