AHK Compiler <error>

Ask for help, how to use AHK_H, etc.
Galaxis
Posts: 73
Joined: 04 Feb 2016, 20:09

AHK Compiler <error>

Post by Galaxis » 21 May 2020, 12:35

Hello.

The script works perfectly before it is compiled. But here is the message I'm getting after I compile it, and run the EXE.
Also, that line of text isn't in the original script.

Image

Does anyone know what this means or how to fix?
Last edited by Galaxis on 21 May 2020, 12:41, edited 1 time in total.

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: AHK Compiler <error>

Post by swagfag » 21 May 2020, 12:40

did u compile it with the ahk_h compiler?

Galaxis
Posts: 73
Joined: 04 Feb 2016, 20:09

Re: AHK Compiler <error>

Post by Galaxis » 21 May 2020, 12:48

Ah, that makes sense. I believe it's the normal AHK compiler.
When I tried the AHK H Compiler, I got this message:

Image

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: AHK Compiler <error>

Post by swagfag » 21 May 2020, 13:10

the compiler is ahk2exe.ahk

HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: AHK Compiler <error>

Post by HotKeyIt » 21 May 2020, 14:15

Make sure you copy the AutoHotkey.exe from the ahk_h package into Compiler folder and rename it to Ahk2Exe.exe, then double click it.
Note! If you want to compile ANSI (Win32a) you will need the AutoHotkey.exe from the same folder, otherwise from Win32w or x64w!

Galaxis
Posts: 73
Joined: 04 Feb 2016, 20:09

Re: AHK Compiler <error>

Post by Galaxis » 21 May 2020, 18:02

@swagfag
@HotKeyIt
Thanks, both of your help and time. Have a great day!!!!

uhwok3n
Posts: 30
Joined: 15 May 2020, 23:08

Re: AHK Compiler <error>

Post by uhwok3n » 29 May 2020, 05:07

Hello @HotKeyIt! I'm having an issue when I'm compiling my script with V2. Here is a screenshot:
compiler_error.png
compiler_error.png (18.1 KiB) Viewed 6824 times
How can I go about fixing this?

HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: AHK Compiler <error>

Post by HotKeyIt » 29 May 2020, 15:05

Can you check MsgBox Type(v)?
Do you have an example script that you are trying to compile?

uhwok3n
Posts: 30
Joined: 15 May 2020, 23:08

Re: AHK Compiler <error>

Post by uhwok3n » 30 May 2020, 15:25

I was using another script that wasn't ahk v2 compatible. I really wanted to switch over to V2(I just ended coding naturally with that syntax) but this script is so necessary for what I'm trying to do. Is there any way to run ahk v1 scripts with v2 via emulation?@HotKeyIt

HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: AHK Compiler <error>

Post by HotKeyIt » 30 May 2020, 15:52

No.
So are you running v1? In that case check content of v?
Do you have a wrong compiler version, line 227 does not contain what you show: https://github.com/HotKeyIt/ahkdll-v1-release/blob/master/Compiler/Directives.ahk#L227

uhwok3n
Posts: 30
Joined: 15 May 2020, 23:08

Re: AHK Compiler <error>

Post by uhwok3n » 31 May 2020, 16:30

No, I tried using ahk_h v2 but received that error, it was due to another ahk script(written for v1) that was required for my script to function(v2). I switched back to ahk_h v1 now. No more errors. Thanks for your help @HotKeyIt!

necomerx
Posts: 57
Joined: 01 Jan 2021, 09:09

Re: AHK Compiler <error>

Post by necomerx » 21 Jan 2021, 18:21

HotKeyIt wrote:
30 May 2020, 15:52
No.
So are you running v1? In that case check content of v?
Do you have a wrong compiler version, line 227 does not contain what you show: https://github.com/HotKeyIt/ahkdll-v1-release/blob/master/Compiler/Directives.ahk#L227
Hi HotKeyit,
I'm also having error with Ahk2Exe_H. I wanted to compile with it. I'm new to the scripting world. I'm using AutoHotkey V1.1.33.02 and at first i downloaded the Ahk_H V2 realease thinking that it is the latest version to use. After getting errors then after researches, i found that i needed the ahk_H V1. After that done, i've installed it how you explain it here but i'm getting this error in the picturre. The AutoHotkeySC.bin is already in the compiler folder, i also copie it from x64w folder to the compiler folder, also to AutoHotkey folder but still it is not working. Can you help me, this's making me crazy since 2/3 days?
Attachments
image.png
image.png (91 Bytes) Viewed 5676 times
Capture Ahk2Exe_H error.PNG
Capture Ahk2Exe_H error.PNG (47.98 KiB) Viewed 5676 times

HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: AHK Compiler <error>

Post by HotKeyIt » 21 Jan 2021, 18:50

Make sure you have the very latest version, there is no need to copy AutoHotkey.exe to compiler folder anymore, just run Ahk2Exe.exe.
Then make sure you select the desired AutoHotkeySC.bin from the dropdown!

necomerx
Posts: 57
Joined: 01 Jan 2021, 09:09

Re: AHK Compiler <error>

Post by necomerx » 21 Jan 2021, 23:15

Thanks for your reply.
The version AutoHotkey V1.1.33.02 is the latest. I have redownloaded and reinstalled it then recopie "ahkdll-v1-release-master" contents to the AutoHotkey folder, then run Ahk2Exe and got the same message with the default "AutoHotkeySC.bin "selected while trying to compile, then I choose v1.1.33.2 AutoHotkeySC.bin (..\x64w) and got this message in the picture. I also have restart the computer then retry and have the same result. I really don't know whats wrong?
Attachments
Capture Ahk2Exe_H error 2.PNG
Capture Ahk2Exe_H error 2.PNG (81.98 KiB) Viewed 5629 times

HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: AHK Compiler <error>

Post by HotKeyIt » 22 Jan 2021, 04:26

Can you add #MaxMem 4095 in Compiler.ahk (line 148) and let me know if it works?

necomerx
Posts: 57
Joined: 01 Jan 2021, 09:09

Re: AHK Compiler <error>

Post by necomerx » 22 Jan 2021, 04:59

Yes. I add it to the line 148 then i create a line above line 148 and paste it there and still got error.
Attachments
Capture Ahk2Exe_H error 3.PNG
Capture Ahk2Exe_H error 3.PNG (16.93 KiB) Viewed 5612 times

HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: AHK Compiler <error>

Post by HotKeyIt » 22 Jan 2021, 06:57

Does it happen too when you compile a simple script?

necomerx
Posts: 57
Joined: 01 Jan 2021, 09:09

Re: AHK Compiler <error>

Post by necomerx » 22 Jan 2021, 07:27

Yes It was a simple script test that i was using but YAY!!! :superhappy:
It seems to be working fine after i run it as administrator!! Will report if i got another issue but i think all will be fine. Thanks you so much for your support and great creation!

killmatt01
Posts: 20
Joined: 25 Mar 2021, 00:12
Contact:

Re: AHK Compiler <error>

Post by killmatt01 » 27 Apr 2021, 15:42

HotKeyIt wrote:
21 May 2020, 14:15
Make sure you copy the AutoHotkey.exe from the ahk_h package into Compiler folder and rename it to Ahk2Exe.exe, then double click it.
Note! If you want to compile ANSI (Win32a) you will need the AutoHotkey.exe from the same folder, otherwise from Win32w or x64w!
Hello @HotKeyIt , I followed your guide however I got an error after double clicked Ahk2Exe.exe (which is shown in the attached pics). :wtf: I am not sure if there is problem with my win10 20H2...
If I double click Ahk2Exe.ahk, the compiler would run successfully but will get an error later :"Error adding script file" if I checked "Use compression..." feature.
The only way now for me to successfully compile a script is not to check "Use compression...". Thusly, i can never try the password encryption feature.
Is there any way I can do to deal with this situation?
Many thanks for help in advance!
Attachments
Snipaste_2021-04-27_16-38-13.png
Snipaste_2021-04-27_16-38-13.png (4.44 KiB) Viewed 5162 times
Snipaste_2021-04-27_16-27-00.png
Snipaste_2021-04-27_16-27-00.png (33.68 KiB) Viewed 5162 times
Snipaste_2021-04-27_16-26-28.png
Snipaste_2021-04-27_16-26-28.png (8.7 KiB) Viewed 5162 times

HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: AHK Compiler <error>

Post by HotKeyIt » 27 Apr 2021, 21:22

Which version are you using, did you try to compile/run from fresh download in a separate folder?

Post Reply

Return to “Ask for Help”