AutoHotkey / AHK

  • This is usually the first programming language that I recommend people use, other than Excel formulas.

 

 

Useful code snippets

 

Set 'Capslock' to mute / unmute, and set Shift+Win and Shift+LAlt to volume-up and volume-down.
Capslock::SoundSet, +1, , mute

+LWin::SoundSet -1
+LAlt::SoundSet +1
Reload the AutoHotkey script; this makes it faster to make changes to the script file and test them:
^F1::
    reload
return
Disable keys that I never use but occasionally hit by mistake.
Insert::
return

Launch_App2:: ; 'Calc' button
return

NumLock::
return

PgUp::
return

PgDn::
return
Toggle Dimmer so I can turn it off easily when I want to take a screenshot.
^F2:: ; Ctrl+F2
    if ProcessExist("Dimmer.exe")
        Process, Close, Dimmer.exe
    else
        Run, C:\Dimmer_v1.0\Dimmer.exe
return

ProcessExist(Name){
	Process,Exist,%Name%
	return Errorlevel
}
  • Bind Ctrl+F3 to PrintScreen for easier screenshots when disabling Dimmer
    ^F3::Send {PrintScreen}
Make the active window set to "Always on top".
^SPACE::  Winset, Alwaysontop, , A
    • This is REALLY helpful when you're trying to copy data from one window to another. If you hit control-space again it goes back to normal.