The Power of AutoHotKey

Trey AroseTechnical Tips1 Comment

Having a keyboard with programmable keys and software is becoming more and more normal these days. What was once utilized primarily by gamers and IT individuals, has now grown in popularity. There is no question that these keyboards are nice, but sometimes just not possible to obtain. Well for anyone who wanted programmable hot keys, AutoHotKey is here to the rescue.

How it works:

AutoHotKey runs in the background, and is connected to a script set up by the user. This script is set by default when you first download the program, and can easily be edited with any text editor. As a user, you can add/change/remove functionalities as you see fit, or as you discover new and useful features.

AutoHotKey.com provides all the documentation you need to get started, but here at M&S we wanted to show you a popular and handy script that we created and use often.

Our script allows full volume control from your keyboard, and we also have one for simultaneously locking your computer, and turning off your monitors!

 

To get started you’ll need the following:
  • AutoHotKey found here
  • NirCmd for locking and powering down your monitors found here

 
Once you have both programs installed, open your AutoHotKey script file and add the following:

;Volume Controls
 #,::Volume_Down ; CTRL-, (comma) is for volume down
 #.::Volume_Up ; CTRL-. (period) is for volume up
 #/::Volume_Mute ; CTRL-/ (front-slash) is for volume MUTE
;requires NirCmd and update to file path
!l:: ; ALT-l locks pc  and powers down monitors
 {
 Run, "C:\Users\user.account\Downloads\nircmd-x64\nircmd.exe" lockws
 Run, "C:\Users\user.account\Downloads\nircmd-x64\nircmd.exe" cmdwait 1000 monitor off
 return
 }

You will need to restart your script for the new hotkeys to work.

Once you’ve restarted AutoHotKey, your new hot keys should work as intended.

One Comment on “The Power of AutoHotKey”

  1. I’d like to explore autohotkey a bit, and if it works the way I hope it will, I’d like to have someone write various (yet unidentified) scripts for me. I am not a computer person, and I don’t want to spend time learning autohotkey or figuring out scripts. My guess is that the scripts I would like as time goes by are pretty simple for someone who knows what he’s doing. I’ve downloaded the program, and I have done my first script, although I borrowed most of it from something I found online; it uses the F6 key to open Acrobat and when I press F6 a second time, it goes to scan to pdf (I do a fair amount of scanning). The next script I’d like is something that would, when I press the “+” key on the numeric portion of the keyboard, have the effect of right-clicking on the Windows 10 Speech Recognition microphone icon, and then left-clicking on “Off: Do not listen to anything I say.” (I do move the microphone icon from time to time, depending on what program I have up on the screen.) Anyway, could I purchase an amount of script-writing time from you, and then call on you as needed?

    Thanks.

    Michael

Leave a Reply

Your email address will not be published. Required fields are marked *