How to set arrow hotkeys in autohotkey?

I'm working on a script in AutoHotkey to allow me to control my computer's volume with my Dell AT101W keyboard (since Windows doesn't provide any keys to control such things, and there are no controlled programs on this keyboard).

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'm not entirely sure if the volume commands are there, but I have absolutely no idea how to get it to recognize up and down key presses (I don't know what that is). Sample scripts are evaluated but not needed.

+3


source to share


1 answer


It's actually quite easy, simple Up

and Down

.

Here is a working script that sets the message balloon to the tray, 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

      

+2


source







All Articles