Adjust volume via batch file or AHK script?

Edit Autohotkey Scripts_thumb.jpg 1If you are considering adding a shortcut to adjust the volume, you should not do this via batch files, instead download Autohotkey and add one line to your AHK file.

AHK – Autohotkey is the best tool to enhance your productivity and assign keyboard shortcuts. I’m frequently programming new scripts for this awesome utility and it’s very easy to create shortcuts that do more than simply assign your volume.

Anyway, it’s really a no-brainer, in Autohotkey you need like 1 line to adjust the volume. In a batch file you’d probably need multiple lines and you can’t assign shortcuts that easily and comfortable as you can with AHK.


^!u::
{
SendInput, {Volume_Up 100}
}
return

^ means CTRL in many programming languages and ! means ALT, u means u key.

So, hit CTRL + ALT + u and you can adjust the volume to increase it to 100.

Adjusting Volume 1

If you only want to increase it by 5% and adjust the volume by hitting the key over and over again, try this:


^!u::
{
SendInput, {Volume_Up}
}
return

Published: Thursday, February 2nd, 2012 Last Modified: February 2, 2012

Related Posts

Rate This Article
5 of 5 0 (100%) 1 vote