AutoHotKey & Notepad++

OK, so I want to get a little more automated, so I figured to go with AHK. So downloading AHK is easy, and getting started using Notepad is also good for the getting started.

But before I get serious I do want some kind of comfort-environment to edit scripts. So I pick my currently favorite editor: Notepad++.

While there is actually a description on how to setup various versions of Notepad++ to work with AHK, I found some pieces were not working – at least not with my current version 5.8.1 of Notepad++. So here are my few steps to get up and running with AHK & Notepad++:

  1. Have Notepad++ and AHK installed (duh!)
  2. Instead of the bundled userDefineLang.xml of AHK I used some modified version. Just download that file to any location.
  3. Start Notepad++ and go to Display\Userdefined Language.
  4. Import the userDefineLang.xml downloaded in step 2.
  5. To get Command-Completion download API-definition and place the XML file into your Notepad++-Programfiles\Plugins\APIs.
  6. Restart Notepad++


  1. What version of N++ where you using when you wrote this? The syntax file didn’t seem to work on v5.9.3 (the command-completion one did). Are you still using AHK with updated N++? Do you have links to an update file?


  2. As noted in the post, I was using N++ 5.8.1 at the time. Currently I’m using N++ 5.9.3 and this setup still seems to work – at least for me.

    Maybe it’s because I upgraded from a working version of N++ & AHK. I still get syntax-highlighting as well as command-completion.

  3. I got it working by manually clicking into Language\AHK AutoHotkey, but it refuses to automatically go to that when I open .ahk files.

    Still, it’s good enough for my purposes ATM. Thanks for the post!

  4. Just a quick tip for anyone else that come on this post. To get the userDefineLang.xml file to work, copy it to %appdata%\Notepad++
    You may need to select Language -> User Defined but it will at least get the right coloring.

  5. No need to put it into %appdata%\Notepad++, just Import and restart. You can see if it was imported by looking for it in the drop-down. Worked for me on:

    Win7 Ultimate x86
    Notepad++ 5.9.8

    Thanks OP, I was looking for this for a long time after reinstalling Windows ^^

Leave a Comment.