Compile the running script, with local icons or ahkSC.bin file, and optionally run it.
See example calls below, typically run Compile once from the auto-execute section. It can also be called from anywhere to compile at will. Any .ico or .AHK.bin files found with the same name as the calling script will be used on compilation.
[None] - Default behavior will compile the script, waiting for completion, and then continue running the script.
"NoWait" - will start the compiler and continue running, without waiting.
"Run" - will compile (and wait), then close this script and run the .exe
"Recompile" - will (if already compiled) close the running .exe, and launch the .ahk (which will recompile if "Run" is used).
[None] - Default behavior compile into A_ScriptName.exe
Other - will use Other.ico, Other.AHK.bin, and create Other.exe
[None] password to use for compiler.
Ahk2Exe, Thread(), Exit, ExitApp
Compile("Run") ;= compiles .ahk into .exe, runs the .exe and exits the .ahk Compile() ;= compiles .ahk into .exe, then continues running the .ahk Compile("NoWait") ;= starts compiler and returns to .ahk without waiting Compile("","NewName") ;= use a custom Name (for input .ico/bin and output exe)
AutoHotkey Homepage | gwarble's Tools | Download Compile.ahk