thqby / ahk2_lib

MIT License
197 stars 26 forks source link

After compile to Exe, LoadScript does not work. #58

Open yzqiang opened 1 week ago

yzqiang commented 1 week ago

I use LoadScript library great. But when I compile my script to Exe using AHK2EXE, it does not work. I trace the error using DebugView++, I found when AHK run script such as: LoadScript(script) There will be error happen and the Exe stop immediately. Exe is very important for me and other AHK developers. Please tell me the reason and help us to find a way. Thanks very much.

yzqiang commented 1 week ago

After researching, I found the reason. Because the Exe infact the LoadScript function must find the LoadScript.ahk script first. If the AHK file can't be found, there will be error such as that image. 5fc2550802ab6f1a32ea0a8b2fe69a0

yzqiang commented 1 week ago

I think maybe it's the AHK2Exe error not the LoadScript error.

thqby commented 1 week ago

Some dynamic code is executed. After the script is compiled, additional library files need to be placed or embedded in source code.