---
title: "AutoHotkey: Automation and Shortcuts | Ometis - Ometis Blog"
description: AutoHotkey is one of the safest ways to run custom scripts to automate simple tasks and create shortcuts on a Windows machine.
image: https://ometis.co.uk/hubfs/Imported_Blog_Media/Blog-HEADERS-04.jpg
---

[![ometis white transparent](https://ometis.co.uk/hs-fs/hubfs/ometis%20white%20transparent.png?width=147&height=65&name=ometis%20white%20transparent.png "ometis white transparent")](https://ometis.co.uk)

- Services 
    - [View all services](https://ometis.co.uk/services-overview)
    - [Data analytics](https://ometis.co.uk/services/data-analytics)
    - [Data engineering](https://ometis.co.uk/services/data-engineering)
    - [Analytics audit](https://ometis.co.uk/services/data-analytics-audit)
    - [Data platform audit](https://ometis.co.uk/services/data-platform-audit)
    - [Qlik training](https://ometis.co.uk/services/training)
    - [Support](https://ometis.co.uk/services/data-support)
- Industries 
    - [Hospitality](https://ometis.co.uk/solutions/hospitality)
    - [Higher Education](https://ometis.co.uk/solutions/higher-education)
    - [Manufacturing](https://ometis.co.uk/solutions/manufacturing)
    - [Financial Services](https://ometis.co.uk/solutions/financial-services)
    - [Other sectors](https://ometis.co.uk/solutions-other-sectors)
- Products 
    - [Tahola-AI](https://ometis.co.uk/product/tahola-ai)
    - [Qlik](https://ometis.co.uk/product/qlik)
    - [Power BI](https://ometis.co.uk/product/power-bi)
    - [Sigma](https://ometis.co.uk/product/sigma)
    - [Inphinity](https://ometis.co.uk/product/inphinity)
    - [Snowflake](https://ometis.co.uk/products/snowflake)
    - [Microsoft Fabric](https://ometis.co.uk/product/microsoft-fabric)
    - [OBackup](https://ometis.co.uk/product/obackup)
    - [Jedox](https://ometis.co.uk/product/jedox)
- About 
    - [About us](https://ometis.co.uk/about-ometis-uk-data-consultancy)
    - [Case studies](https://ometis.co.uk/case-studies)
    - [Partners](https://ometis.co.uk/data-technology-partners)
- Resources 
    - [Events](https://ometis.co.uk/events)
    - [Blog](https://ometis.co.uk/blog-news)

 Contact

![](https://secure.leadforensics.com/80580.png)

 November 05, 2020 By Ometis

# AutoHotkey: Automation and Shortcuts

Share:

- <https://www.linkedin.com/sharing/share-offsite/?url={url}&title={title}>
- <http://x.com/share?text={title}&url={url}&>

## What is AutoHotkey?

AutoHotkey is a free, open-source scripting language for Windows that allows users to easily create small to complex scripts for all kinds of tasks, such as form fillers, auto-clicking, macros, etc. You can find more about it here: [https://www.autohotkey.com/](https://www.autohotkey.com/)

In other words, it’s one of the safest ways to run custom scripts to automate simple tasks and create shortcuts on a Windows machine.

I started using AHK more than six years ago. At the beginning it was only to store commonly used passwords – which I’d advise against doing now – but that’s what got me started. I started reading blog posts and forums about it and discovered the crazy things some people did with it, and that gave me ideas. Over those last six years I’ve been creating small snippets and modifying some that I found to better suit my needs. They have become second nature to me, to the point where sometimes I’ll forget I’m on another machine when I’m still hitting the key combination for one of the snippets and it doesn’t work. They are simple things, but simple things can sometimes be very useful, so now I present them to you. Here’s a link to the code so you can follow the next points in this blog: [https://gist.github.com/alvaro-ometis/696b0e0a13a94c6a0321791dd24401dc](https://gist.github.com/alvaro-ometis/696b0e0a13a94c6a0321791dd24401dc).

## AutoHotkey Function list

### Load \* Inline \[\];

Replaces the string `l8i` with the string

```
LOAD * INLINE [

];
```

and leaves your cursor in the second line.

![Animation showing the Load \* Inline in action - AutoHotkey](https://ometis.co.uk/hs-fs/hubfs/Imported_Blog_Media/2020-10-26_16-08-51.gif?width=660&height=200&name=2020-10-26_16-08-51.gif)

### Dollar bracket expansion – $()

Replaces the string `$V` (uppercase V) with `$()` and places the cursor in the middle of the brackets. This might only save a keystroke or two but after using it for a while I find it easier to type than the alternative.

![Animation showing the dollar wrap in action - AutoHotkey](https://ometis.co.uk/hs-fs/hubfs/Imported_Blog_Media/2020-10-29_10-49-57.gif?width=660&height=200&name=2020-10-29_10-49-57.gif)

### Wrap selection in dollar bracket – $(someText)

If you select some text and hit `Ctrl` + `Shift` + `4` it will wrap the selected text with the dollar bracket expansion. E.g.: `vDate` \>\> `$(vDate)`

![Animation showing the Dollar Bracket expansion in action - AutoHotkey](https://ometis.co.uk/hs-fs/hubfs/Imported_Blog_Media/2020-10-26_16-12-07.gif?width=660&height=200&name=2020-10-26_16-12-07.gif)

### Wrap selection in square brackets – \[someField\]

If you select some text and hit `Alt` + `[` it will wrap the selected text with square brackets. E.g.: `Field with Spaces` \>\> `[Field with Spaces]`

![Animation showing the wrap in square brackets in action - AutoHotkey](https://ometis.co.uk/hs-fs/hubfs/Imported_Blog_Media/2020-10-26_16-13-43.gif?width=660&height=200&name=2020-10-26_16-13-43.gif)

### Navigate to previous script section (Qlik Sense)

Holding `Alt` and scrolling up with the mouse scroll wheel will navigate to the previous (up) script section/tab in the Data Load Editor.

![Animation showing the navigation to previous in action](https://ometis.co.uk/hs-fs/hubfs/Imported_Blog_Media/2020-10-26_16-14-35.gif?width=660&height=200&name=2020-10-26_16-14-35.gif)

### Navigate to next script section (Qlik Sense)

Holding `Alt` and scrolling down with the mouse scroll wheel will navigate to the next script (down) section/tab in the Data Load Editor.

![Animation showing the navigation to next in action](https://ometis.co.uk/hs-fs/hubfs/Imported_Blog_Media/2020-10-26_16-14-31.gif?width=660&height=200&name=2020-10-26_16-14-31.gif)

### Toggle comments in script

Holding `Ctrl` and pressing the `/` key will toggle comments on the Data Load Editor. This is currently available as `Ctrl` + `K` but since pretty much all other code editors use `Ctrl` + `/` I decided to create a shortcut for myself.

![Animation showing the commenting in action](https://ometis.co.uk/hs-fs/hubfs/Imported_Blog_Media/2020-10-26_16-16-20.gif?width=660&height=200&name=2020-10-26_16-16-20.gif)

These last three are all targeted towards a specific internet browser since that’s where [Qlik Sense](https://www.ometis.co.uk/qlik-software/qlik-sense/) lives for the most part. If you open the AHK script, you’ll see a commented section just above these three snippets of code where I listed the codes for the most commonly used browsers. You can edit the snippets to target your browser like this:

```
; [Qlik] - Hotkeys - [Alt] [Mouse Scroll Wheel Up] - Navigates to the previous script section
#IfWinActive ahk_exe chrome.exe
!WheelUp::PgUp
```

Where it says `#IfWinActive ahk_exe chrome.exe` you can replace `ahk_exe chrome.exe` with `ahk_exe firefox.exe` to target Mozilla Firefox or any other browser code on the list.

### Email starter

Replaces the string `;hi;` with

```
Hi ,



Regards,
YOUR_NAME_HERE
```

And places the cursor just before the comma after “Hi” so you can type the name of the person who you’re writing to. Make sure you replace “YOUR\_NAME\_HERE” in the code with your actual name. This just makes my life easier when responding to emails or support tickets, especially to make sure I don’t make a mistake and sign with Retards instead of Regards – it almost happened a couple of times back when I manually typed it – it’s not good for customer satisfaction.

### Open VS Code or switch to it

Holding `Win` – the Windows key – and pressing `C` will open Visual Studio Code, my code editor of choice, or switch to it if it’s already open. Sure you can just pin it to your taskbar and use `Win` + the number for the position it has on your bar, but if you have multiple windows opened, it’ll switch to your most recent one. It’s a small detail but, again, it makes my life easier which is the point of this.

### Open Windows Explorer window or switch to it

Holding Win and pressing `E` will open the Windows Explorer window or switch to it if there’s one open already. The first part, opening the Windows Explorer with `Win` + `E` is a Windows thing, you can try it without running AutoHotKey and it should open the Windows Explorer. The issue with it is that if you do it again, it’ll open a new window. My function attempts to fix that and switches to the Explorer window if you have one open already.

### Open new Windows Explorer window

Holding `Win` and `Shift` and then pressing `E` will always open a new Windows Explorer window. This was necessary in order to have the ability to open a new Explorer window. I decided to use `Shift` since it’s the same key Windows uses when you want to open a new window of one of the programs pinned to your taskbar.

## AutoHotkey Function basics

Each function has a comment above that describes the type of function, how to trigger it, and what it does. Let’s break down one of the examples to see what it does:

```
; [Qlik] - Text replacement - l8i - Load * Inline
; e.g.: LOAD * INLINE [
;
; ];
:*:l8i::LOAD {*} INLINE {[}{Enter 2}{]};{Left 3}{Space 2}
```

`[Qlik]` indicates the category or area of business that the code falls under. It’s more of an organising tool that helps me separate the code into areas, nothing strict. On this script you’ll find the following categories: **Qlik**, **Support**, and **General**.

`Text replacement` tells us that the code below will be triggered by replacing text the user typed, in this case it’s the string l8i. The types of triggers I created are: **Hotkeys**, **Text selection + Hotkeys**, and **Text replacement**.

`l8i` is the string of text the user has to type in order to trigger the execution of the code. When the trigger includes hotkeys it’ll be displayed like this `[Ctrl] [/]`. This means the trigger is holding the key Ctrl and pressing forward slash.

`Load * Inline` is a comment describing what the code does. In this case it generates the load \* inline statement.

Finally, there might be an example section where the resulting code will be displayed. Not all the code sections have one since some open applications or interact with different windows. In this case we can see the load \* inline statement:

```
; e.g.: LOAD * INLINE [
;
; ];
```

## How to use AutoHotkey

1. Navigate to [https://www.autohotkey.com/](https://www.autohotkey.com/) and **download the current version**. Follow the steps on the installation wizard and hit Exit when the installation is complete.
2. Download the custom script that contains all the snippets described in this post. You can find it at [https://gist.github.com/alvaro-ometis/696b0e0a13a94c6a0321791dd24401dc](https://gist.github.com/alvaro-ometis/696b0e0a13a94c6a0321791dd24401dc). Once it’s downloaded, place it on a folder of your choosing. I have it on the My Documents folder but it’s up to you.
3. Right click the .ahk file you just downloaded and create a shortcut to it. Leave the Explorer window open as we’ll have to move that shortcut to another folder later on.
4. Go to the startup folder on your PC. If you’re on Windows 10, you can do this in a few different ways: 
     1. Navigate to `C:\Users\YOUR_USER_HERE\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup`
     2. Right click the start menu icon and click on **Run**. Type `shell:startup` and hit Enter or OK.
     3. Press `Win` + `R` and type `shell:startup` and hit Enter or OK.
5. Drag the shortcut we created on step 3 to the startup folder you just opened. That way we make sure Windows launches the script every time the PC boots up.
6. Finally, just execute the script through the shortcut or the original file. A green icon with a white **H** should appear on your system tray which means the program is running.

## Learn more about AutoHotkey

Here’s a list of resources that helped me on my quest for automation with AHK.

- The official help site for AHK – [https://www.autohotkey.com/docs/AutoHotkey.htm](https://www.autohotkey.com/docs/AutoHotkey.htm)
- The subreddit for AHK – [https://www.reddit.com/r/AutoHotkey/](https://www.reddit.com/r/AutoHotkey/)
- The Stackoverflow tag – [https://stackoverflow.com/questions/tagged/autohotkey](https://stackoverflow.com/questions/tagged/autohotkey)
- And, of course, there’s always DuckDuckGo/Google/etc.

I hope you enjoy using this tool as much as I do. Feel free to leave a comment and let me know what you think!

 

By Álvaro Martínez

## Comments

#### Related Posts

[![](https://ometis.co.uk/hubfs/Screenshot%202025-03-24%20112126.png)](https://ometis.co.uk/blog-news/qlik-talend-cloud-cross-pipeline-projects-guide)

 March 24, 2025

#### [How to use Qlik Talend Cloud Cross...](https://ometis.co.uk/blog-news/qlik-talend-cloud-cross-pipeline-projects-guide)

 Learn how Qlik Talend Cloud's Cross Pipeline Projects feature creates flexible data architectures for more efficient data engineering workflows.

[Go to Post](https://ometis.co.uk/blog-news/qlik-talend-cloud-cross-pipeline-projects-guide)

[![](https://ometis.co.uk/hubfs/Screenshot%202024-11-26%20161955.png)](https://ometis.co.uk/blog-news/guthub-version-control-qlik-talend-cloud)

 November 27, 2024

#### [How to set up GitHub version control in...](https://ometis.co.uk/blog-news/guthub-version-control-qlik-talend-cloud)

 Learn how to set up GitHub version control in Qlik Talend Cloud and transform your data integration projects.

[Go to Post](https://ometis.co.uk/blog-news/guthub-version-control-qlik-talend-cloud)

[![](https://ometis.co.uk/hubfs/Geospatial%20data%20visualisation%20(2).png)](https://ometis.co.uk/blog-news/geospatial-data-visualisation-a-qliksense-and-kml-tutorial)

 September 25, 2024

#### [Geospatial data visualisation: a Qlik...](https://ometis.co.uk/blog-news/geospatial-data-visualisation-a-qliksense-and-kml-tutorial)

 Learn how to integrate KML with QlikSense for enhanced geospatial data analysis and create interactive maps for better strategic planning. === Main Point Summary: The blog provides a tutorial on...

[Go to Post](https://ometis.co.uk/blog-news/geospatial-data-visualisation-a-qliksense-and-kml-tutorial)

### Be the first to hear about new events and updates

###### Technical Support

There are three ways to log support tickets:

![Canva Design DAFuEILuqpo](https://ometis.co.uk/hs-fs/hubfs/Canva%20images/Canva%20Design%20DAFuEILuqpo.png?width=30&height=30&name=Canva%20Design%20DAFuEILuqpo.png)   **Email:**  [help@ometis.co.uk](mailto:help@ometis.co.uk)

![Canva Design DAFuEAregRg](https://ometis.co.uk/hs-fs/hubfs/Canva%20images/Canva%20Design%20DAFuEAregRg.png?width=30&height=30&name=Canva%20Design%20DAFuEAregRg.png)   **Portal:**  [support.ometis.co.uk](mailto:help@ometis.co.uk)

![Canva Design DAFuEBb7e8M](https://ometis.co.uk/hs-fs/hubfs/Canva%20images/Canva%20Design%20DAFuEBb7e8M.png?width=30&height=30&name=Canva%20Design%20DAFuEBb7e8M.png)   **Phone:** +44 (0) 330 363 9900

Our support team is available to help Monday to Friday 09:00 to 17:30 GMT, excluding UK national holidays.

###### Sitemap

- [Data Integration](https://ometis.co.uk/data-integration)
- [Data Governance](https://ometis.co.uk/data-governance)
- [Data Analytics](https://ometis.co.uk/services/data-analytics)
- [Services](https://ometis.co.uk/services)
- [Blog](https://ometis.co.uk/blog-news)
- [About](https://ometis.co.uk/about)

###### General Enquiries

For all general enquiries:

![Canva Design DAFuEILuqpo](https://ometis.co.uk/hs-fs/hubfs/Canva%20images/Canva%20Design%20DAFuEILuqpo.png?width=30&height=30&name=Canva%20Design%20DAFuEILuqpo.png)   Email:  [info@ometis.co.uk](mailto:info@ometis.co.uk)

![Canva Design DAFuEBb7e8M](https://ometis.co.uk/hs-fs/hubfs/Canva%20images/Canva%20Design%20DAFuEBb7e8M.png?width=30&height=30&name=Canva%20Design%20DAFuEBb7e8M.png)   Phone:  +44 (0) 330 363 9900

###### Company Information

Ometis Limited,   
42 Lytton Road, Barnet,  
Greater London, EN5 5BY

Company Number: 7095283         VAT: 106236937

 

© 2026. All rights reserved | [Terms of use](https://ometis.co.uk/terms-of-use) | [Privacy](https://ometis.co.uk/privacy) | [Ts & Cs](https://ometis.co.uk/standard-conditions-of-supply)

[Follow us on LinkedIn](https://www.linkedin.com/company/ometis-limited/)

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Ometis",
    "url" : "https://ometis.co.uk/blog-news/author/ometis"
  },
  "dateModified" : "2023-10-12T12:27:45.785Z",
  "datePublished" : "2020-11-05T12:36:10.000Z",
  "headline" : "AutoHotkey: Automation and Shortcuts | Ometis - Ometis Blog",
  "image" : [ "https://ometis.co.uk/hubfs/Imported_Blog_Media/Blog-HEADERS-04.jpg" ],
  "mainEntityOfPage" : {
    "@id" : "https://ometis.co.uk/blog-news/autohotkey-automation-shortcuts",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://ometis.co.uk/hubfs/ometis%20orange%20transparent-1.png"
    },
    "name" : "Ometis Limited"
  }
}
```

```json
{
  "@context" : "http://schema.org",
  "@type" : "Corporation",
  "address" : {
    "@type" : "PostalAddress",
    "addressCountry" : "United Kingdom",
    "addressLocality" : "Hertfordshire",
    "addressRegion" : "",
    "postalCode" : "EN5 5BY",
    "streetAddress" : "42 Lytton Road Barnet"
  },
  "alternateName" : "Ometis",
  "description" : "Ometis is a UK data consultancy and the UK's largest dedicated Qlik partner, helping organisations get more value from their data through integration, analytics, dashboards, training and support.",
  "email" : "info@ometis.co.uk",
  "image" : "",
  "logo" : "https://143260848.fs1.hubspotusercontent-eu1.net/hubfs/143260848/ometis%20orange%20transparent-1.png",
  "mainEntityOfPage" : {
    "@id" : "https://ometis.co.uk/blog-news/autohotkey-automation-shortcuts",
    "@type" : "WebPage",
    "description" : "AutoHotkey is one of the safest ways to run custom scripts to automate simple tasks and create shortcuts on a Windows machine."
  },
  "name" : "Ometis Limited",
  "sameAs" : [ "https://www.linkedin.com/company/ometis-limited/" ],
  "telephone" : "0330 363 9900",
  "url" : "http://www.ometis.co.uk"
}
```