How to debug autohotkey scripts?

The popular SciTE-based AutoHotkey Script Editor
Shuu148
Posts: 39
Joined: 11 May 2023, 21:25

How to debug autohotkey scripts?

Post by Shuu148 » 16 May 2023, 11:25

What is wrong here? I'm trying to debug scripts and only with Autohotkey it doesn't work, you need extra programs for that right? That's why I downloaded SciTe but I get the error: "C:\Program Files\AutoHotkey\AutoHotkey.exe" /ErrorStdOut "P:\scite\TestSuite.ahk"
The command "C:\Program" is either misspelled or
could not be found.

[Mod edit: Moved topic from AHK v2 help to 'Editors > SciTE4AutoHotkey', since it is about the editor's usage. Also this isn't v2, but v1 code.]
Attachments
1.PNG
1.PNG (58.54 KiB) Viewed 972 times

gregster
Posts: 9113
Joined: 30 Sep 2013, 06:48

Re: How to debug autohotkey scripts?

Post by gregster » 16 May 2023, 11:31

To run AHK v1 code, SciTE expects the AutoHotkey.exe interpreter of AHK v1 in the folder C:\Program Files\AutoHotkey\. In german Windows, the folder is usually called 'Programme' (although Windows will also understand 'Program Files' synonymously).

Shuu148
Posts: 39
Joined: 11 May 2023, 21:25

Re: How to debug autohotkey scripts?

Post by Shuu148 » 16 May 2023, 11:45

I have only Autohotkey v2. How do i bind it to that?
Attachments
1.PNG
1.PNG (28.52 KiB) Viewed 955 times

gregster
Posts: 9113
Joined: 30 Sep 2013, 06:48

Re: How to debug autohotkey scripts?

Post by gregster » 16 May 2023, 11:51

Either install AHK v1 along with v2 (and then use that) or use the version selector in SciTE4AHK: viewtopic.php?f=76&t=117012&p=521769#p521693
To be clear, the code you posted above is v1 code - like you have it now, it will throw an error in v2.
The corresponding v2 code would be

Code: Select all

msgbox "Hello World!"

Shuu148
Posts: 39
Joined: 11 May 2023, 21:25

Re: How to debug autohotkey scripts?

Post by Shuu148 » 16 May 2023, 12:22

Thx it works.

Post Reply

Return to “SciTE4AutoHotkey”