Page 1 of 1

right click compile

Posted: 13 Aug 2020, 08:12
by Trigun
hello,
i think i builded and set up ahk with ahk_h,
right now in the compile folder i have ahk2exe.ahk, if i use ahk2exe for selfcompile i get the exe but i can't find a way for run it from command line

in the regedit i tried a few combo with "path" "/in" "%1" or something like that but i always get errors, now i changed the command as explorer.exe path so it will just open the folder and after i have to manually do the rest..... but i don't like it :-)

any tips?

Re: right click compile

Posted: 13 Aug 2020, 10:29
by HotKeyIt

Re: right click compile

Posted: 13 Aug 2020, 16:42
by Trigun
so i have to make a new script that launch the compiler and i should launch that 1 instead of the compiler?

Re: right click compile

Posted: 13 Aug 2020, 18:08
by HotKeyIt
You can make a batch script or a shortcut.
Alternatively you can compile Ahk2Exe.

Re: right click compile

Posted: 15 Aug 2020, 14:30
by kyuuuri
Hello, I made this .reg that adds 3 options to the right click menu: Compile x32 Ansi, Compile x32 Unicode, Compile x64 Unicode.
Make sure that each path is right

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Compile x32 Ansi]
@="Compile x32 ANSI"

[HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Compile x32 Ansi\Command]
@="\"C:\\Program Files\\AutoHotkey\\AutoHotkey.exe\" \"C:\\Program Files\\AutoHotkey\\Compiler\\Ahk2Exe.ahk\" /in \"%l\" /bin \"C:\\Program Files\\AutoHotkey\\Win32a\\AutoHotkeySC.bin\""

[HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Compile x32 Unicode]
@="Compile x32 Unicode"

[HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Compile x32 Unicode\Command]
@="\"C:\\Program Files\\AutoHotkey\\AutoHotkey.exe\" \"C:\\Program Files\\AutoHotkey\\Compiler\\Ahk2Exe.ahk\" /in \"%l\" /bin \"C:\\Program Files\\AutoHotkey\\Win32w\\AutoHotkeySC.bin\""

[HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Compile x64 Unicode]
@="Compile x64 Unicode"

[HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\Compile x64 Unicode\Command]
@="\"C:\\Program Files\\AutoHotkey\\AutoHotkey.exe\" \"C:\\Program Files\\AutoHotkey\\Compiler\\Ahk2Exe.ahk\" /in \"%l\" /bin \"C:\\Program Files\\AutoHotkey\\x64w\\AutoHotkeySC.bin\""
Save it as .reg and then double click it.

Re: right click compile

Posted: 23 Aug 2020, 07:25
by Trigun
i compiled and put all the vars precompiled in the ahk :-D psw too :-)
btw my problem was the wrong line on the regedit, was %1 instead of %l if i remember well....