HotKeyIt / ahkdll-v2-release

AutoHotkey_H v2 release
http://hotkeyit.github.io/v2/
GNU General Public License v2.0
61 stars 15 forks source link

CreateScript Error Compiling with Custom Bin in Alternate Directory #18

Closed ghost closed 3 years ago

ghost commented 3 years ago

Attempting to compile using a CustomBin that is not in the x64w repo fails with a Syntax error.

Test Repo: https://github.com/Deafwave/ahkdll-v2-release/tree/testCompiler

Steps to Reproduce:

  1. Execute test\compileAll.exe which will run test\compileAll.ahk
  2. This will compile multiple files
  3. Expected: All Pass
  4. Actual: Syntax Error on CustomBin execution
    • [Error] Attempting to compile using CustomBin named AutoHotkey.exe with a custom 10-character password while placed in ahkdll-v2-release\Compiler\AutoHotkey.exe: https://i.imgur.com/2c9XOVcm.jpg

Working As Intended:

HotKeyIt commented 3 years ago

This is because it uses the v1 lib, place the custom bin in Compiler\v2! Ahk2Exe.ahk is necessary if Ahk2Exe.exe is not compiled! Note, there is DirGetParent function that you can use. Also best is to use quotes for command line, just to be sure:

RunWait("`"" Ahk2ExePath "`" `"" Ahk2ExeScript "`" /in `"" inScript "`" /out `"" outScript "`" /NoDecompile /pass oCKArYwIpx /bin `"" binToUse "`" /compress " compress)