Right Click AHK Script's Icon (task bar) > Edit option uses Notepad not Notepad++

Get help with using AutoHotkey and its commands and hotkeys
jwinfl
Posts: 41
Joined: 16 Aug 2017, 12:37

Right Click AHK Script's Icon (task bar) > Edit option uses Notepad not Notepad++

12 Sep 2018, 10:35

When I right click any running AHK script's icon in task bar (bottom right) and then click Edit, the script opens in Notepad not Notepad++
I have Notepad++ set up in the registry to edit AHK scripts.
HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Edit\Command="C:\Program Files\Notepad++\notepad++.exe" "%1"
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AutoHotkeyScript\Shell\Edit\Command="C:\Program Files\Notepad++\notepad++.exe" "%1"
This problem started happening a month or two ago, before that "edit" used notepad++.

How do I get AHK's icon "edit" to use Notepad++?

My System Specs...
Windows 10 x64 (Latest Updates)
Intel Core i7-920 2.66ghz CPU
12gb DDR3 1600 Triple Chanel Memory
AMD Radeon HD 7850 2GB 256bit GDDR5 Memory Graphics Card
Hisense 49" 4K Monitor (3840x2180)
lexikos
Posts: 7085
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Right Click AHK Script's Icon (task bar) > Edit option uses Notepad not Notepad++

12 Sep 2018, 17:22

Right click on an .ahk file in Explorer. Do you have the "Edit Script" option?

I'm going to guess that you do not, because it's likely that the "AutoHotkeyScript" key is not being used. This happens when the association for .ahk is changed, such as with "Open With". Firstly, delete the UserChoice registry key if it exists. If that does not work, ensure that the default value of HKCR\.ahk is "AutoHotkeyScript".
jwinfl
Posts: 41
Joined: 16 Aug 2017, 12:37

Re: Right Click AHK Script's Icon (task bar) > Edit option uses Notepad not Notepad++

12 Sep 2018, 21:55

Thank you lexikos.
Edit Script option was missing in Explorer.
Removing "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ahk\UserChoice" solved the edit problem, no other action was necessary.
Right clicking any .ahk file now has the "Edit Script" option.
Thanks Again

Return to “Ask For Help”

Who is online

Users browsing this forum: DanRim, Google [Bot], Rohwedder, william_ahk and 39 guests