Autohotkey  Introduction

Introduction: AutoHotkey (AHK) is a powerful scripting language for Windows that allows users to automate repetitive tasks, create custom shortcuts, and enhance overall productivity. Whether you’re a seasoned coder or a beginner looking to streamline your daily activities, AutoHotkey provides a flexible and user-friendly solution.

Getting Started with AutoHotkey

Installation:

Begin by downloading and installing AutoHotkey from the official website (https://www.autohotkey.com/).

As version 1.0 has been deprecated, here we download version 2.0 or above.

Once installed, you can create and edit scripts using a simple text editor like Notepad, or you can try Notepad++.

Key List

win -- #,  left win: <#,  right win: #>, ( other keys are the same) ;
alt -- ! ;
ctrl -- ^ ;
shift -- + ;

Basic Scripting Concepts

Automating Text Expansion

::btw::by the way
::omw::on my way
::afaik::as far as I know

In this example, whenever you type “btw,” AutoHotkey will automatically replace it with “by the way.” Customize these abbreviations to suit your preferences, saving time on commonly used phrases.

Creating Custom Shortcuts

^!t::
  Run, notepad.exe
  return

This script assigns the Ctrl + Alt + T shortcut to open Notepad. Feel free to modify the combination and application to match your workflow.

Window Management

#h::
  WinMaximize, A
  return

#q::
  WinMinimize, A
  return

Pressing Win + H maximizes the active window, while Win + Q minimizes it. These scripts showcase AutoHotkey’s ability to control window behavior efficiently.

Alt + arrow keys / Alt + Shift for cursor adjustments

!h:: Send {left}
!l:: Send {right}
!k:: Send {up}
!j:: Send {down}

Using KJHL to move the cursor up, down, left, and right allows typing without having to leave the main keyboard area.

The above is an AutoHotKey introduction, along with some beginner scripts that I use. AHK is a powerful tool that goes beyond simple key remapping and autofill. It can be utilized for more advanced functionalities, such as implementing commonly used shortcuts on Mac

Scroll to Top