AHK Script stopped working - SOLVED!! THANK YOU!

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Psycan
Posts: 7
Joined: 15 Jul 2020, 07:25

AHK Script stopped working - SOLVED!! THANK YOU!

15 Jul 2020, 07:32

AHK was working fine when it suddenly stopped working. Clicking on the script.ahk started opening the notepad edit window instead of running the script.

I have uninstalled and re-installed AHK twice, and then installed an earlier version, all to no avail. I have copied my script into a new .ahk file. I have checked the the ahk file in the ahk folder and in documents. Again, all to no avail.

I am getting around this currently by using the compiler to create an script.exe, but this is cumbersome as every time I want to change something in the script, I have to re-compile.

Does any one know how to fix this? At 70 years old, I am not very tech savvy and could use a pointer in the right direction.
Last edited by Psycan on 20 Jul 2020, 06:33, edited 1 time in total.
User avatar
Maestr0
Posts: 136
Joined: 05 Dec 2013, 17:43

Re: AHK Script stopped working

15 Jul 2020, 08:00

Psycan wrote:
15 Jul 2020, 07:32
AHK was working fine when it suddenly stopped working. Clicking on the script.ahk started opening the notepad edit window instead of running the script.

I have uninstalled and re-installed AHK twice, and then installed an earlier version, all to no avail. I have copied my script into a new .ahk file. I have checked the the ahk file in the ahk folder and in documents. Again, all to no avail.

I am getting around this currently by using the compiler to create an script.exe, but this is cumbersome as every time I want to change something in the script, I have to re-compile.

Does any one know how to fix this? At 70 years old, I am not very tech savvy and could use a pointer in the right direction.
If your computer starts opening scripts in notepad instead of executing it, it means it's not executing them, not running them. If you re-installed and it didn't fix the issue, then it seems likely that the issue is with a security program that has flagged autohotkey.exe as a possible virus.

See if you can find the autohotkey folder and see if there is a .exe file there. If there is, try dragging and dropping a .ahk file to that .exe and see if that runs the script.

Please post your findings here and we'll take it from there.
User avatar
boiler
Posts: 16965
Joined: 21 Dec 2014, 02:44

Re: AHK Script stopped working

15 Jul 2020, 08:15

Did you create a file association in Windows for .ahk files and your editor? If you opened a .ahk file using “Open with...” and chose an editor and checked the box saying “Always use this app to open .ahk files”, that would cause it to open using your editor instead of running it. There’s a different way that you associate the program that you would use to edit the file than the one you would use to “open” the file.

See this page on how to check and change your default file associations. Go to the section “Change default apps by file type” and see what app .ahk files are shown to be associated with.
Psycan
Posts: 7
Joined: 15 Jul 2020, 07:25

Re: AHK Script stopped working

20 Jul 2020, 06:33

SOLVED - THANK YOU!

Both solutions worked! In the first moving the program and the file to desktop, I can pass the latter over the first and works fine.

The second solution was the lack of the file association, which for some reason AHK did not make automatically (as always it has before) and I did not know to do manually.

THANK YOU!
User avatar
Maestr0
Posts: 136
Joined: 05 Dec 2013, 17:43

Re: AHK Script stopped working

20 Jul 2020, 12:06

Psycan wrote:
20 Jul 2020, 06:33
SOLVED - THANK YOU!

Both solutions worked! In the first moving the program and the file to desktop, I can pass the latter over the first and works fine.

The second solution was the lack of the file association, which for some reason AHK did not make automatically (as always it has before) and I did not know to do manually.

THANK YOU!
You're welcome, glad you got it sorted!
autohotkeyfan22
Posts: 1
Joined: 16 Jul 2021, 14:07

Re: AHK Script stopped working - SOLVED!! THANK YOU!

16 Jul 2021, 14:12

I just had to pause the script then un-pause it, then the run script again. This may have occurred because I hadn't ran the script in some time.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, Draken, Google [Bot] and 182 guests