Compile does not work

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
ilreberli
Posts: 2
Joined: 02 Jun 2023, 02:33

Compile does not work

Post by ilreberli » 02 Jun 2023, 02:47

I'm back to Windows after many years (new PC, fresh install), remembered AHK, installed it and can't do a simple compile.
Then I found an old script that worked in my Windows backups, but that doesn't work either and I can't figure out what the problem is.

Sorry if this is a stupid question :facepalm:

Image

TAC109
Posts: 1099
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Compile does not work

Post by TAC109 » 02 Jun 2023, 03:40

There is quite a difference in the syntax between v1 and v2 scripts. The line shown looks like it is from a v1 script and would be flagged as invalid by v2 AutoHotkey. To compile a v1 script it is necessary to have earlier installed v1 AutoHotkey and then select a v1 base file in the compile dialogue.

Cheers
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe

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

Re: Compile does not work

Post by boiler » 02 Jun 2023, 05:11

Did you get the same error when you ran the script? Are you aware that AHK scripts are meant to run as .ahk files and that compiling the script isn’t actually compiling the code?

ilreberli
Posts: 2
Joined: 02 Jun 2023, 02:33

Re: Compile does not work

Post by ilreberli » 02 Jun 2023, 06:17

TAC109 wrote:
02 Jun 2023, 03:40
There is quite a difference in the syntax between v1 and v2 scripts. The line shown looks like it is from a v1 script and would be flagged as invalid by v2 AutoHotkey. To compile a v1 script it is necessary to have earlier installed v1 AutoHotkey and then select a v1 base file in the compile dialogue.

Cheers
You have right, but I wasn't aware about the changes.
I was looking for samples with google, which was obviously a bad idea.

While running the script the message appeared, that this need Autohotkey V1

Post Reply

Return to “Ask for Help (v2)”