Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Split: AHK Basic and AHK_L Side by Side

  • Please log in to reply
4 replies to this topic
  • Members
  • 4 posts
  • Last active:
  • Joined: 25 Mar 2013

I have been personally using AHK Basic for several years now & never saw a need to learn AHK_L until just recently. I wanted to be able to have AHK operate on selected files with reliability & I saw AHK_L as having some advantages on this. I downloaded & installed AHK_L then created a script with the extension .ahkl. I associated this with the new AHK_L & it ran just fine. Then I tried to re-associate the .ahk extension with AHK Basic. I was shocked shocked.png & dismayed confused.png to learn that I could NOT re-associate my AHK Basic scripts to the AHK Basic extension. Then I remembered, sadly, when AHK_L first came out I downloaded & installed it, excited to try the new AHK... yet for this reason I had to uninstall it. I don't have the time to rewrite all of my AHK Basic scripts. Who wants to go to that much trouble ! If there was a program that could convert all of my old scripts to AHK_L that would be great ! Since there is not... I need a simple solution to be able to run BOTH side by side (sxs).


cool.png Here's the SIMPLE SOLUTION: cool.png

AFTER READING THE PROBLEMS OTHERS HAVE HAD IN TRYING TO RUN BOTH SIDE BY SIDE this is what I have come up with: cool.png Starting point: AHK Basic installed to a unique directory, I downloaded & installed AHK_L to its own unique directory. I created a script & gave it the extension .ahkl which I associated with AHK_L


1. In AHK Basic program directory I copied AutoHotKey.exe & pasted it into its own same directory resulting in AutoHotKey_2.exe which I renamed AutoHotKey_B.exe. Explanation: This results in AutoHotKey_B.exe & AutoHotKey.exe in the same directory which avoids problems later in running Ahk2exe.exe, etc. Which has been an issue for others according to what I read on this site.


2. Then I associated .ahk files with AHK Basic as follows:

     Right click .ahk script > Select Open With > Choose Default program > navigate to & select AutoHotKey_B.exe.


Eureka! cool.png  


Both AHK Basic & AHK_L are installed side by side with both Ahk2Exe.exe compilers working for each perspective scripts & each having their own extensions .ahkl & .ahk for basic. This has been my SIMPLE SOLUTION.cool.png  Which so far works without a hitch.

  • Members
  • 141 posts
  • Last active: Jun 28 2019 01:05 AM
  • Joined: 11 Nov 2012

Here is the REG script I wrote to conveniently have access to both AutoHotkey_Classic and AutoHotkey_L side-by-side. I download them in ZIP form (non-installer version) and unzip them to folders such as:




The following registry script makes the associations and puts them on the right-click menu. The default double-click action for .ahk files is set to run with AutoHotkey Classic.

Windows Registry Editor Version 5.00

; Delete old associations before remaking them.


@="AutoHotkey Script"



@="Run AHK Classic"

@="\"D:\\PortableApps\\AutoHotkey\\AutoHotkey.exe\" \"%1\" %*"

@="Run AHK Lexikos"

@="\"D:\\PortableApps\\AutoHotkey_L\\AutoHotkey.exe\" \"%1\" %*"

@="Compile AHK Classic"

@="\"D:\\PortableApps\\AutoHotkey\\Compiler\\Ahk2Exe.exe\" /in \"%1\""

@="Compile AHK Lexikos"

@="\"D:\\PortableApps\\AutoHotkey_L\\Compiler\\Ahk2Exe.exe\" /in \"%1\""

  • Members
  • 4 posts
  • Last active:
  • Joined: 25 Mar 2013


It looks like your solution would work perfectly well. I see you have both Ahk2Exe.exe's working. 


I think the solution I posted is simpler unless I had to install these together multiple times.  


Most people don't like to edit the registry. Also I have my AHK programs in different locations than these. I'd have to read through it & edit it for the proper locations. Also these reg edits seem to be for the PortableApps versions. Also it looks like I'd have to rename some files. 


Your solution would be a better solution for automating the installation of these together though. I'd probably prefer it if I had to install them together repetitively.


Thanks for the response. 

  • Members
  • 650 posts
  • Last active:
  • Joined: 12 Nov 2011

I also use ahk_l and ahk_basic together using Majkinetor batfiles.The original files are a dead link but i added a copy (just look at page 2 of the post).It makes it easier to associate the extensions ...just run them!



From Majkinetor:



winXP  and ahk unicode

  • Members
  • 133 posts
  • Last active: Nov 15 2013 12:32 AM
  • Joined: 12 Oct 2010

Many thanks for this post. I use ahk basic daily but program it infrequently and stick to basics. I never switched to AHK-L because I dreaded changing my scripts and saw no need for its additions.


Because I want to spend as little time programming as possible, since it is not my profession, I avoided solutions to try out AHK-L that require remembering registry changes or .bat files. Many times, months (or years) later I am forced to revisit an issue and I have learned to try to avoid those situations as much as possible, particularly where they involve step by step changes and involve remembering what was originally done that must now be reversed or even understood again. Only so many hours in the day!


Your "low-tech" solution is by far the easiest I have seen, and I do not have to remember the steps you have done because they are so easy and obvious. Good job!