Productivity Windows

10+ Cool AutoHotkey Scripts & How to Make Your Own

Ben Stegner 02-06-2016

Taking shortcuts is awesome — there’s something about doing a task in a speedy way that gives you a sense of fulfillment. Once you’ve mastered the huge list of Windows keyboard shortcuts and have every Windows 10 gesture down flat, you might be hungry for more ways to use shortcuts.


AutoHotkey (AHK) is the answer to all of your customization needs. This one little program can take care of remapping keys, creating new shortcuts, and running macros to automate repetitive tasks. Let’s take a look at some awesome scripts you can download and start using right now, then get some AHK basics down so you can make your own scripts where these don’t suffice!

If you need a detailed introduction to AHK, take a quick detour to our AutoHotKey guide for beginners The Quick AutoHotkey Guide for Beginners AutoHotkey is a powerful free and open source Microsoft Windows tool that can automate repetitive tasks. Learn how to use it here. Read More  before you proceed.

Installing AutoHotkey

Before you can test out some scripts or make your own, you’ll need to get AutoHotkey installed. Visit the main page for AHK, click Download on the right side, and choose Installer to grab the easiest version to install. Run through the quick install dialogue, and you have AutoHotkey running and ready to go!

Now, the program you just installed handles the execution of the scripts you write in AutoHotkey’s language, but you don’t have any scripts running, yet! To create a new one, make sure AutoHotkey is running (by opening your Start Menu and typing AutoHotkey to run the program), then right-click anywhere on your desktop or wherever else is convenient and choose New > AutoHotkey Script. Name it something useful and make sure the file ends in .ahk, or it won’t work correctly.

If you’re going to be writing some scripts for AutoHotkey, it’s a good idea to upgrade your text editor from the bland Notepad. Notepad++ is a great free option and is recommended for this purpose. Note that you can open your text editor, type some code, and simply save it as a file ending in .ahk and you’ll achieve the same result as the above method.


Now that you have the software to run the scripts, you can download the code that others have written to automate all sorts of tasks. To save a script, simply download it as an .ahk file and save it wherever you wish.

You’ll probably want some of these scripts to run as soon as you boot your computer so you don’t have to remember to start them manually every time. To do that, copy and paste the .ahk files into your Startup folder by typing shell:startup into the Start menu, or browsing to the following location:

C:\Users\[USERNAME]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

This will ensure they’re running as soon as you start, so you don’t try to use the key combinations and get nothing!

The Best AutoHotkey Scripts

Here are some of the best scripts you can download and start using to make Windows even better right away.


1. AutoCorrect

AutoCorrect is a staple of smartphone keyboards How to Turn On or Off Autocorrect for Android and Samsung Devices Here's how to turn on autocorrect on Android and Samsung devices, plus how to turn it off and tweak autocorrect settings. Read More , but it hasn’t really made its way to desktop yet since you have more precise typing on the latter. However, you’re still bound to make mistakes when typing (whether by slip of the fingers or just not knowing the spelling of a word), so AutoCorrect should be one of the first scripts you get on your computer.

This is an old script, but typos don’t go out of style. It contains tons of common misspellings and when you commit one, it instantly replaces it with the correct version. It even allows you to edit your own words in, which we’ll discuss later.

Download: AutoCorrect Script

2. Disable Lock Keys

The three Lock keys — Num Lock, Caps Lock, and Scroll Lock — aren’t really used that often in today’s computing. You probably only use the number pad for numbers, don’t ever hit Caps Lock except by accident Oops! 10 Keyboard Shortcuts Users Keep Hitting by Mistake Find that your keyboard won't type properly? Here are common keyboard shortcuts that cause issues and how to fix them. Read More , and might not even know what Scroll Lock does. You can make Windows play a tone when you hit these keys How to Get Alerted When Caps Lock Is Enabled in Windows Caps lock can strike at the worst times. Here's how to know as soon as you hit that annoying key. Read More , but to go further, try setting them to a default value with this script:

; Set Lock keys permanently
SetNumlockState, AlwaysOn
SetCapsLockState, AlwaysOff
SetScrollLockState, AlwaysOff

This assumes you want Num Lock always on; if you prefer it off, just change that line (or remove it completely and only deal with Caps and Scroll Lock).

3. Re-purpose Caps Lock

Once you’ve used the above code to disable Caps Lock, it makes sense to give that key another purpose Isn't It Time You Made Use of Your Caps Lock? The CAPS LOCK key is probably the most useless key on your keyboard. Netiquette forbids you to use it because it's considered screaming, which is simply rude. And what else would you use it for... Read More .

Using this short script will turn Caps Lock into another Shift key, but you can change it to anything you’d like (perhaps another Windows key, if your keyboard only has one of those):

; Turn Caps Lock into a Shift key

4. Quickly View or Hide Hidden Files

We’ve shown you how to view hidden folders in Windows How to View Hidden Files and Folders in Windows Need to work with a hidden file or folder in Windows? Here's how to view them in just a few clicks. Read More , because many people want them showing all the time. If you only need access to hidden folders once in a while and don’t want them cluttering up your work normally, however, this is the script for you.


This script simply has you press Windows Key + H with any folder open to toggle its hidden files or folders. That’s all there is to it!

Download: Toggle Hidden Files Script

5. Quickly Show or Hide Known File Extensions

In a similar vein, sometimes you want to see file extensions for every file; this comes in handy, if you have multiple files with the same name, or want to make sure that something you downloaded and thought was a PDF isn’t actually a harmful .exe. The below script will let you toggle showing extensions for known file types with Windows Key + Y.

Download: Toggle Known File Extensions Script

6. Insert Special Characters

Though your keyboard has some special characters (like @ or *), there are dozens more that are pretty tedious to access, if you use them with any frequency. With just a line of AHK code, you can quickly insert these special symbols and stop having to hunt around with ALT codes 15 Common Symbols You Can Insert With the Alt Key Your keyboard has lots of symbols, but there are plenty more that aren't immediately accessible. Read More or copy and paste from a Web list.

Use the template below to create shortcuts that will be useful for you; the left characters are what you press to trigger the shortcut, while the symbol inside the brackets is what gets inserted. So, if you want to press ALT + Q to insert the trademark icon, you would type:

!q::SendInput {™}

For reference, the characters for keys are as follows. You can read more about hotkeys on AHK’s guide page.

  • ^ for CTRL
  • ! for ALT
  • # for Windows Key
  • + for Shift

7. Mimic a Chromebook Search Key

Google’s Chromebooks have many shortcuts of their own, including a completely different key. Google decided to remove the infrequently used Caps Lock key and replace it with a Search button on their machines. You can get a similar functionality with a simple script.

This will launch your default browser and search Google for any bit of text you have highlighted when you press CTRL + Shift + C. Handy to reduce copying and pasting all the time!

 Send, ^c
 Sleep 50

8. Use the Numpad as a Mouse

You can navigate Windows with just keyboard shortcuts, but having this script around makes it a lot easier if you don’t want to remember all of those. It uses your number pad to act as a mouse, giving you more precision and a way to get around your computer in case of a failure.

Download: Using Keyboard Numpad as a Mouse Script

9. Launch Any App

Launchers like Launchy are great for pulling up any program installed on your computer in seconds, but for your most-used programs you might want a faster way.

The script to open an app is simple; here’s one to launch Firefox when you press Windows Key + F:

#f::Run Firefox

10. Paste into a Command Prompt

Up until Windows 10, you had to right-click and choose Paste to paste anything into a command line; the usual shortcut CTRL + V didn’t work.

If you’re still holding out on Windows 10, this quick script lets you use CTRL + V to paste into the Command Prompt like normal.

#IfWinActive ahk_class ConsoleWindowClass
SendInput {Raw}%clipboard%

Even More!

For even more scripts, including ones that are much more complex, check out the AutoHotkey Script Showcase.

Writing Your Own Scripts

If you’re just getting started with AHK, you’ll probably benefit the most from text expansion.

Basically, text expansion lets you type a bit of text that automatically expands to a lot. Do you have repetitive emails you send multiple times a day? How often do you type out your email address when signing into websites and the like? Instead of wasting time typing these items out every time, set up some text expansion and become more productive.

If you downloaded the AutoCorrect script above, there’s a place at the bottom for you to add any phrases of your own, which is a perfect place to add some single-line expansion. If you’re not using this script, just make a new script for your entries.

It’s quite simple: type two colons, followed by the hotkey text. After two more colons, type the phrase to be expanded. So, if you wanted to make typing “@@” auto-expand to your email address, the script would be:

The possibilities here are many — you could make the hotkey CTRL + ALT + C spit out a canned email that you type several times a day, or any number of other tasks pertinent to your work:

Send Hello,{enter}This is a canned email.

Once you’ve set up some text expansion, you can start remapping keys if you find some of them not useful in their current state.

Do you wish the Insert button was a shortcut for Copy? You can do that!


Check out the AutoHotkey tutorials for more info.

The Power of AutoHotkey

The great part about AutoHotkey is that it’s completely customizable for your needs. If you just want AutoCorrect and a few simple bits of text expansion, you can easily set that up. If you want to go deeper with lots of custom controls and complex shortcuts, you can write anything you please.

You shouldn’t have any trouble coming up with uses for AHK. For starters, you can combine it with existing Microsoft Office shortcuts 60 Essential Microsoft Office Keyboard Shortcuts for Word, Excel, and PowerPoint Hundreds of keyboard shortcuts are available in Office, but these are the most important ones you should know because they will save you a lot of time. Read More and you’ll be more productive than ever before!

Image Credit: holding dental equipment by FabrikaSimf via Shutterstock

Related topics: Keyboard Shortcuts, Productivity.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Juanma Menendez
    April 12, 2019 at 1:53 am

    Good article Ben!

    I created myself a script very easy to use and configure that allow to Open, Minimize or Restore a Window App, a Chrome App or a Chrome shortcut.

    It also has some other features like Error catching etc.. the code is here:

    **Configuration Examples**

    F7:: OpenOrShowAppBasedOnExeName("C:\Windows\System32\SnippingTool.exe")

    F8:: OpenOrShowAppBasedOnWindowTitle("Gmail", "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --app=")

    I hope you found it helpful ;) ?????

  2. Mitchell Allen
    June 29, 2016 at 2:10 pm

    Hi Ben,

    I use AutoHotKey for everything. (the letters a h k spell out AutoHotKey for me. The letters c h e sign all of my emails and post comments.)

    Here is a tip for email addresses and any other auto-expansion keywords that fit the bill:

    Normally, a space is required after typing the keyword, such as your @@ example. To immediately expand the text, change the definition to :*:@@::

    That small change may not seem like much, but it "feels" faster and you don't have to backspace to remove the space (if you had to before).

    I also use a few custom combinations of Numpad0 + key to launch, edit, and interact with batch files. Here is a useful example:

    ;Purpose: Send "enter()" to command window
    ; If Python is running, it will exit
    ; If at prompt, window will close
    Numpad0 & NumpadEnter::
    SendInput exit(){Enter}

    You can read more about custom combinations here:



  3. Anonymous
    June 3, 2016 at 4:42 pm

    Very good article, thanks a lot ! I use AHK scripts a lot, written by others. So, apart from some more useful scripts given above, I will also be able to learn more about the writing of them.

    • Anonymous
      June 3, 2016 at 5:07 pm

      Edit: the command prompt script does not work for an elevated command.

      • Klaas Vaak
        December 26, 2017 at 1:24 pm

        It does on my Win 8.1/64-bit computer.

        • Klaas Vaak
          September 12, 2018 at 4:14 pm

          Edit: my mistake, it does NOT work on Win 8.1/64

  4. Jerome Masson
    June 3, 2016 at 8:20 am

    I use AHK every single day at work and it saves me for a lot of things!

    I use it to:
    - type credentials that are asked any time I access files on a SharePoint
    - launch Notepad (default script)
    - type a signature in emails

    Before migrating to Office 2016, we were using Office 2007. So I was using AHK to "emulate" the quick actions from the newer versions (i.e. Ctrl+Shift+1 to forward an email to a certain person).

    I also created a set of scripts to move the Outlook and Skype windows from one screen to another (when I switch from laptop only to docking station with second monitor, and vice versa).
    This is time saving for me as I move these 2 windows every time I go to a meeting.

    I use AHK along with Rainmeter and Rocket Dock. And I can tell you that I will never go back to the "plain Jane" version of Windows!!

    • Ben Stegner
      June 4, 2016 at 4:21 pm

      That's awesome! It sounds like you really have a good grip on what AHK can do and use it to iron out the less efficient parts of Windows. Thanks for sharing!