# Auto Hot Key

AutoHotkey doesn't do anything on its own; it needs a script to tell it what to do. A script is simply a plain text file with the .ahk filename extension containing instructions for the program, like a configuration file, but much more powerful. A script can do as little as performing a single action and then exiting, but most scripts define a number of hotkeys, with each hotkey followed by one or more actions to take when the hotkey is pressed.

# AutoHotkey Script Showcase

This showcase lists some scripts created by different authors which show what AutoHotkey might be capable of. For more ready-to-run scripts and functions, see Scripts and Functions Forum.

# 1. Some of my own shortcuts

# 1.1 Keyboard shortcuts Matrix

`hash`              #       Windows Key
`exclamation mark`  1       ALT
`caret`             ^       CTRL
`plus`              +       Shift

# 1.2 Run as Admin

Add the following to the top of your script to let it run in admin mode, so that it can support any apps

if not A_IsAdmin
{
   Run, *RunAs %A_ScriptFullPath% ; Requires v1.0.92.01+
   ExitApp
}

# 2. Some Shortcut keys

# 2.1. Script to reload your scripts file

^!ScrollLock::      ; CTRL + ALRT + Scroll Lock
Run, "C:\dev\autoHotKey\base.ahk"
Return

# 2.2. Auto Completing Passwords

::pw::
SendInput *******
Return

::pwlo::
SendInput ********************
Return

::cof::
Send code-insiders -r 
Return

# 2.3 Open paths quickly in Windows

This will let you press CTRL + ALT + p (p for paths or whatever key you prefer). Then releaseing all the keys and then pressing a to open C:\Apps, d to open C:\Dev etc

!^p::      ; CTRL + ALT + p
input, command, L1
if command = a
Run, "C:\Apps"
if  command = d
Run, "C:\Dev"
if command = w
Run, "c:\laragon\www"
if command = o
Run, command = "c:\Users\charl\Downloads"
if command = s
Run, command = "c:\Software"
if command = h
Run, command = "c:\Windows\System32\drivers\etc"
if command = k
Run, command = "c:\dev\autoHotKey"
Return