Page 1 of 2

AHK Compiler <error>

Posted: 21 May 2020, 12:35
by Galaxis
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?

Re: AHK Compiler <error>

Posted: 21 May 2020, 12:40
by swagfag
did u compile it with the ahk_h compiler?

Re: AHK Compiler <error>

Posted: 21 May 2020, 12:48
by Galaxis
Ah, that makes sense. I believe it's the normal AHK compiler.
When I tried the AHK H Compiler, I got this message:

Image

Re: AHK Compiler <error>

Posted: 21 May 2020, 13:10
by swagfag
the compiler is ahk2exe.ahk

Re: AHK Compiler <error>

Posted: 21 May 2020, 14:15
by HotKeyIt
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!

Re: AHK Compiler <error>

Posted: 21 May 2020, 18:02
by Galaxis
@swagfag
@HotKeyIt
Thanks, both of your help and time. Have a great day!!!!

Re: AHK Compiler <error>

Posted: 29 May 2020, 05:07
by uhwok3n
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 7034 times
How can I go about fixing this?

Re: AHK Compiler <error>

Posted: 29 May 2020, 15:05
by HotKeyIt
Can you check MsgBox Type(v)?
Do you have an example script that you are trying to compile?

Re: AHK Compiler <error>

Posted: 30 May 2020, 15:25
by uhwok3n
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

Re: AHK Compiler <error>

Posted: 30 May 2020, 15:52
by HotKeyIt
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

Re: AHK Compiler <error>

Posted: 31 May 2020, 16:30
by uhwok3n
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!

Re: AHK Compiler <error>

Posted: 21 Jan 2021, 18:21
by necomerx
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?

Re: AHK Compiler <error>

Posted: 21 Jan 2021, 18:50
by HotKeyIt
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!

Re: AHK Compiler <error>

Posted: 21 Jan 2021, 23:15
by necomerx
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?

Re: AHK Compiler <error>

Posted: 22 Jan 2021, 04:26
by HotKeyIt
Can you add #MaxMem 4095 in Compiler.ahk (line 148) and let me know if it works?

Re: AHK Compiler <error>

Posted: 22 Jan 2021, 04:59
by necomerx
Yes. I add it to the line 148 then i create a line above line 148 and paste it there and still got error.

Re: AHK Compiler <error>

Posted: 22 Jan 2021, 06:57
by HotKeyIt
Does it happen too when you compile a simple script?

Re: AHK Compiler <error>

Posted: 22 Jan 2021, 07:27
by necomerx
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!

Re: AHK Compiler <error>

Posted: 27 Apr 2021, 15:42
by killmatt01
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!

Re: AHK Compiler <error>

Posted: 27 Apr 2021, 21:22
by HotKeyIt
Which version are you using, did you try to compile/run from fresh download in a separate folder?