Skip to content

An AutoHotkey boilerplate to help jumpstart a script for personal productivity

Notifications You must be signed in to change notification settings

Ajhad1/AutoHotkeyScripts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoHotkey Boilerplate

A boilerplate to help jumpstart a script for personal productivity

Goal

  • Provide easy access to all the features of AutoHotkey
  • Understandable structure for future additions

Installation

Prerequisite: Install AutoHotkey from ahkscript.org

To get these scripts working on your computer, follow these steps:

  1. Install AutoHotKey
    You can download it here

  2. Clone this repo
    git clone https://github.com/Ajhad1/AutoHotkeyScripts.git

  3. Duplicate the AutoHotKey.ahk file to the Documents folder
    When AutoHotKey starts up, it looks for a file named AutoHotKey.ahk in your Documents folder. So duplicate the file by that name, and point it to where you cloned this repo in Step 2.

AutoHotKeyDir := "C:\Users\ajhad\Documents\GitHub\AutoHotkeyScripts"         ; <--- Edit this to point to your path
Run, %A_AhkPath% "%AutoHotKeyDir%\Main.ahk", %AutoHotKeyDir%
  1. Set AutoHotKey to run at startup
    Create a shortcut to AutoHotKey (C:\Program Files\AutoHotkey\AutoHotkey.exe). Then open the Windows Run utility (Win+R) and type shell:startup to open your Startup folder. Then paste the AutoHotKey shortcut in this folder.

Usage

  1. Edit Settings.ini as needed
  2. Run Main.ahk

Structure

.
|-- Main.ahk
|-- Settings.ini
|-- Scripts\
|   |-- AppSpecific.ahk
|   |-- Functions.ahk
|   |-- HotStrings.ahk
|   `-- Hotkeys.ahk
|-- Lib\
`-- Util\

Customization

Hotkeys.ahk

Universal shortcuts

; Ctrl+Alt+R to reload entire script
^!r::Reload

Hotkey Docs

Hotstrings.ahk

Auto-expanding Hotstrings are stored here

; Single Line
::btw::by the way

; Multi-Line
::btw::
    MsgBox You typed "btw".
Return

Hotstrings Docs

Functions.ahk

Re-usable functions, automatically loaded by Main.ahk

 Add(x, y)
 {
     return x + y
 }

Function Docs

AppSpecific.ahk

This file is organizing application specific shortcut or hotstrings. This is achieved using #If or #IfWin directives

; Control+Click selection in Notepad++ only
#IfWinActive ahk_class Notepad++
	^LButton::
		Send {LButton 2}
		Return
#IfWinActive

About

An AutoHotkey boilerplate to help jumpstart a script for personal productivity

Resources

Stars

Watchers

Forks

Languages

  • AutoHotkey 99.4%
  • PowerShell 0.6%