I've just downloaded the latest AutoHotkey_H master from...
https://github.com/HotKeyIt/ahkdll-v2-release/archive/refs/heads/master.zip
Using the included Ahk2Exe to compile scripts, quite a lot (probably most) v2 code that runs normally as a standard .ahk script with AHK_H installed, results in a compiled .exe that reports errors and fails to run.
This happens when the "Use Compression" and "Encrypt" boxes are checked.
The following example script runs normally as a .ahk script with AHK_H installed, but after compiling with "Use Compression" and "Encrypt" checked, the .exe displays an error and fails to run.
Code: Select all
form := gui()
buttonTest1 := form.add('button', '', 'Test1')
buttonTest2 := form.add('button', '', 'Test2')
buttonTestClick1(*) {
MsgBox('Test1 Button Clicked')
}
buttonTest2Click(*) {
MsgBox('Test2 Button Clicked')
}
buttonTest1.onEvent('click', buttonTestClick1)
buttonTest2.onEvent('click', buttonTest2Click)
form.show()
The .exe displays...
Code: Select all
test.exe
Error at line 8.
Line Test: buttonTest2Click(*) {
Error: Missing "}"
The program will exit.
Without checking "Use Compression" and "Encrypt", the compiled .exe runs normally.
Also, compiling with the standard AutoHotkey v2.0-beta.3 included Ahk2Exe also results in .exe files that run normally.
The errors only occur when the AHK_H version of Ahk2Exe is used and the "Use Compression" and "Encrypt" boxes are checked.
Is there a trick to this that I'm missing?
Thanks for any advice.
Regards,
LBJ