AHK Scripts do not start during Windows 11 boot as before SSD install

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
cyrowth
Posts: 1
Joined: 06 Oct 2022, 12:11

AHK Scripts do not start during Windows 11 boot as before SSD install

Post by cyrowth » 06 Oct 2022, 16:19

Installed new SSD in Dell Inspiron laptop, clean install of Windows 11, re-installed all apps including AHK, and transferred all files back to new drive. Located the 2 ".ahk script" files in Windows Documents and "Startup" folders. However, on Windows startup, the 2 script files just open on the desktop in Notepad. The icons look like notepad icons rather than the "green H" for AHK scripts. I have set Antivirus exception for AutoHotKey so it doesn't interfere with operation.

On my other 3 computers/laptops running Windows 11 and 10, the identical files show the file type as "ahk script" with green H icon. When I copy these same files to flash drive and move them to my new SSD laptop, the files show as "ahk files" with a notepad icon.

If I click the "ahk file" and choose "open with AutoHotKey, it runs and will enter passwords with <CTRL + Key> as desired. Conversely, if I move the "ahk file" from the SSD laptop to on of the other computers (1 is virtually identical to mine in hardware and software), it shows as a green H icon and file type ahk script.

If I redo the creation procedure by right clicking the desktop and selecting create AutoHotKey Script and paste in the script text, when saved, it looks and behaves just like the transferred files. The AutoHotKey scripts performed perfectly on the same laptop, with the identical version of Windows and AutoHotKey, before changing to the SSD.

At a loss for what to try next?? Any suggestions ??

User avatar
boiler
Posts: 16931
Joined: 21 Dec 2014, 02:44

Re: AHK Scripts do not start during Windows 11 boot as before SSD install

Post by boiler » 06 Oct 2022, 16:40

That means that you accidentally associated the .ahk extension on that computer with Notepad, probably because you performed a right-click and "Open with..." and chose Notepad and said to do that every time. The problem is the "Open" verb is for running the file. You only want to associate the "Edit" verb with your editor for .ahk files so that it opens in an editor when you right-click and choose Edit. So go into your Windows file associations and set .ahk files to be open with the AutoHotkey.exe file, probably located in C:\Program Files\AutoHotkey.

gato-do-mato
Posts: 3
Joined: 14 Aug 2017, 15:45

Re: AHK Scripts do not start during Windows 11 boot as before SSD install

Post by gato-do-mato » 13 Oct 2022, 17:23

Yes...

I had this same problem and you killed the question.

Thank you very much, boiler.

It seems like an obvious thing, but we never think about it.

Hugs from South Brasil

Post Reply

Return to “Ask for Help (v1)”