How to change AutoHotKey default editor in Win10 Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
SL5
Posts: 879
Joined: 12 May 2015, 02:10
Contact:

How to change AutoHotKey default editor in Win10

23 Apr 2018, 11:59

to change AutoHotKey default editor in Win10 to VS code?

seems very difficult in this great big ;) win10 :lol: :headwall: BTW the win 10 in total looks like as stupikd clickie bunti app ;) it remembers me to this modern webpages with 40% white paper and big wallpaper and less functionallity ;)
Last edited by SL5 on 23 Apr 2018, 12:21, edited 1 time in total.
User avatar
SL5
Posts: 879
Joined: 12 May 2015, 02:10
Contact:

Re: How to change AutoHotKey default editor in Win10  Topic is solved

23 Apr 2018, 12:09

Computer\HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Edit\Command
C:\Program Files\Microsoft VS Code\Code.exe %1
FreeFog
Posts: 2
Joined: 13 Feb 2016, 11:18

Re: How to change AutoHotKey default editor in Win10

26 Mar 2020, 14:58

Hi I needed to enclose the values in double quotes :

Code: Select all

Computer\HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Edit\Command
"C:\Program Files\Microsoft VS Code\Code.exe" "%1"
User avatar
mikeyww
Posts: 26859
Joined: 09 Sep 2014, 18:38

Re: How to change AutoHotKey default editor in Win10

03 Aug 2021, 23:02

FYI for anyone who wants this. On my new computer with Windows 10, the following key was the one needed to make the editor change work for my portable AHK.

HKEY_CURRENT_USER\SOFTWARE\Classes\Applications\AutoHotkey.exe\shell\edit\command
Technomage Awunes
Posts: 9
Joined: 25 Oct 2021, 20:33

Re: How to change AutoHotKey default editor in Win10

11 Nov 2021, 13:09

Here's a little script I improved from the archived forums about the same issue (not necessarily windows 10) hope it helps someone :)

Code: Select all

If not A_IsAdmin{
Run *RunAs "%A_ScriptFullPath%" ; causes script to reload and be run as admin
}
#SingleInstance, Force ; prevent's 2nd prompt to change the editor
InputBox, UserInput, Default AutoHotKey Editor change, Please enter a full path name for your editor
if ErrorLevel
    MsgBox, Ah... Don't want - so bye :)
else
{
    MsgBox, Changing default AutoHotKey editor to "%UserInput%"
    RegWrite, REG_SZ, HKEY_CLASSES_ROOT, AutoHotkeyScript\Shell\Edit\Command,, "%UserInput%" "`%1"
}
muzza3000
Posts: 1
Joined: 02 Feb 2022, 06:28
Contact:

Re: How to change AutoHotKey default editor in Win10

02 Feb 2022, 06:30

Technomage Awunes wrote:
11 Nov 2021, 13:09
Here's a little script I improved from the archived forums about the same issue (not necessarily windows 10) hope it helps someone :)

Code: Select all

If not A_IsAdmin{
Run *RunAs "%A_ScriptFullPath%" ; causes script to reload and be run as admin
}
#SingleInstance, Force ; prevent's 2nd prompt to change the editor
InputBox, UserInput, Default AutoHotKey Editor change, Please enter a full path name for your editor
if ErrorLevel
    MsgBox, Ah... Don't want - so bye :)
else
{
    MsgBox, Changing default AutoHotKey editor to "%UserInput%"
    RegWrite, REG_SZ, HKEY_CLASSES_ROOT, AutoHotkeyScript\Shell\Edit\Command,, "%UserInput%" "`%1"
}
This works great, thanks so much :bravo:

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: haomingchen1998, mikeyww, mmflume, roysubs, scriptor2016, ShatterCoder and 102 guests