Cant' run scripts

The popular SciTE-based AutoHotkey Script Editor
morielo_aut
Posts: 3
Joined: 14 Mar 2023, 13:15

Cant' run scripts

Post by morielo_aut » 14 Mar 2023, 13:28

Sorry for my bad english...


So... after I formatted my computer, none of my AHK scripts run when i hit F5, not even new ones... anyone know what is that?
I have the same problem with both versions of autohotkey... The image below is just an example when i press F5.
Attachments
imagem_2023-03-14_152123006.png
imagem_2023-03-14_152123006.png (32.95 KiB) Viewed 1637 times

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

Re: Cant' run scripts

Post by boiler » 14 Mar 2023, 15:10

That script could never work even before you formatted your computer because you have a line at the top forcing it to use AHK v2, but you have v1 code shown below it. What happens if you run it without the #Requires line? Or you change it to #Requires AutoHotkey v1.1?

morielo_aut
Posts: 3
Joined: 14 Mar 2023, 13:15

Re: Cant' run scripts

Post by morielo_aut » 16 Mar 2023, 08:18

The same problem... with or without #Requires...
I tried install other versios too, but the error continues

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

Re: Cant' run scripts

Post by boiler » 16 Mar 2023, 10:48

Can you run it by double-clicking on the .ahk file in File Explorer instead of running it from SciTE4AutoHotkey and show that error message, if any? Maybe your editor is set up to run with a certain AHK binary. Plus, I'd rather see the standard AHK error message box.

morielo_aut
Posts: 3
Joined: 14 Mar 2023, 13:15

Re: Cant' run scripts

Post by morielo_aut » 17 Mar 2023, 09:54

i tried it, just dont open, nothing happens...

i already tried use others editors too, sublime, vscode... it says "2023-03-17 11:55:46 Autohotkey Execute Bin Not Found : C:/Program Files/AutoHotkey/AutoHotkeyU64.exe"

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

Re: Cant' run scripts

Post by boiler » 17 Mar 2023, 11:45

morielo_aut wrote: i tried it, just dont open, nothing happens...
Are you sure it's not running? Nothing is supposed to happen in the script you showed until you press the hotkey, although as I mentioned, it should show an error message if you keep the #Requires line saying to use v2 when it contains code written with v1 syntax. If it really isn't running, there is either something wrong with your AHK installation, or with your association of .ahk files in Windows, or both. What does File Explorer say in the "Type" column for a .ahk file in a "Details" view in File Explorer?

morielo_aut wrote: i already tried use others editors too, sublime, vscode... it says "2023-03-17 11:55:46 Autohotkey Execute Bin Not Found : C:/Program Files/AutoHotkey/AutoHotkeyU64.exe"
You should get your basic AHK installation working before trying to get the extensions in editors to run your scripts.

Post Reply

Return to “SciTE4AutoHotkey”