Skip to content

Small yet mighty AutoHotkey v2 scripts.

License

Notifications You must be signed in to change notification settings

mtsknn/AutoHotkey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 

Repository files navigation

Small yet mighty AutoHotkey v2 scripts

The scripts

Installation instructions

  1. Download and install AutoHotkey v2.
    • The scripts are developed for v2.0-beta.1. Newer versions might also work since the scripts are very simple.
    • Currently there's no installer for v2, only a zip file. Extract the zip file e.g. to %programfiles%/AutoHotkey_2.0-beta.1/.
  2. Download the scripts that fancy you or clone the whole repo:
    git clone https://github.com/mtsknn/AutoHotkey.git
  3. Run the scripts that fancy you by opening them.
    • When opening an .ahk file for the first time, Windows should ask you what program to use to open the file. Select "Always use this app to open .ahk files" and choose AutoHotkey64.exe from AutoHotkey's installation folder.
    • If Windows doesn't ask you, or if you later want to change the default program to open .ahk files:
      1. Right click on an .ahk file and select "Properties."
      2. Change the program in the "Opens with" section.

Bonus points if you modify the scripts to your liking!

Running scripts automatically when logging in to Windows

Create shortcuts for the scripts and place the shortcuts to %appdata%/Microsoft/Windows/Start Menu/Programs/Startup.

  • To open the Startup folder:
    1. Open the Run dialog by pressing Win + R.
    2. Type shell:startup to the Run window and press Enter.
  • To create a shortcut:
    • Drag and drop an .ahk file to the Startup folder while holding Alt.
    • Or right click on an .ahk file and select "Create shortcut," and then move the shortcut to the Startup folder.

Remarks

#SingleInstance directive

The #SingleInstance directive is used in every script. It allows only a single instance of a script to be running, so that running a script that is already running makes the new instance replace the old instance automatically.

Why AutoHotkey v2 instead of v1

Because it's so much better. More details coming some day.

Recommended apps

These apps provide functionality that I would want to create with AutoHotkey if these apps didn't exist.

In order of importance:

  • TouchCursor provides Vim-like keyboard shortcuts anywhere in Windows.
    • Examples:
      • Space + H / J / K / L = arrow keys.
      • Space + I = Backspace.
      • Space + W = Ctrl + Backspace = delete previous word.
  • T-Clock allows customizing the taskbar clock.
    • T-Clock sometimes has problems with DPI scaling. I once tried to recreate the functionality using AutoHotkey, but found it too difficult, so I continue using T-Clock.
    • Since Windows 11, "apps can no longer customize areas of the Taskbar." 😟
  • KeyMouse provides Vimium-like keyboard shortcuts in any app (e.g. Windows Explorer).

License

MIT © Matias Kinnunen