==================================================
TIPS ON DOWNLOADING/COMPILING/MODIFYING THE AUTOHOTKEY SOURCE CODE
==================================================
TO DOWNLOAD THE SOURCE CODE
[AHK v1.1/v2.0 source code zips]
Releases · Lexikos/AutoHotkey_L · GitHub
https://github.com/Lexikos/AutoHotkey_L/releases
[AHK v1.0 source code zips][older versions]
Releases · AutoHotkey/AutoHotkey · GitHub
https://github.com/AutoHotkey/AutoHotkey/releases
==================================================
TO COMPILE
the AHK v1.1/v2.0 README.md file states:
check the README.md file for more details regarding compiling AutoHotkey
download and install one of Visual C++ 2010/2012/2013/2015
this could require around 6-7 gigabytes of hard disk space
to compile (as 32-bit Unicode):
open AutoHotkeyx.sln in Visual C++ 2010/2012/2013/2015,
Build, Configuration Manager...,
Active selection configuration:, choose Release,
Build, Build Solution
note: it creates an exe that is identical or *almost* identical to the official one
depending on the Visual C++ version used and the settings used
==================================================
TO ADD/ALTER FUNCTIONALITY (FUNCTIONS + 'A_' VARIABLES)
3 main files need to be changed to add/modify BIFs/BIVs (built-in functions/variables):
script.cpp/script.h (trivial changes), script2.cpp (main code).
(I would recommend using a text editor such as Notepad2 or Notepad++ to edit the files since Notepad cannot handle LF-delimited text correctly.)
Some examples of text to search for to find BIF/BIV code:
[AHK v1 functions]
e.g. BIF: Abs:
[script.cpp] BIF_DECL(BIF_Abs);
[script.h] bif = BIF_Abs;
[script2.cpp] BIF_DECL(BIF_Abs)
[AHK v2 functions]
e.g. BIF: Abs:
[script.cpp] BIF1(Abs, 1, 1),
[script.h] BIF_DECL(BIF_Abs);
[script2.cpp] BIF_DECL(BIF_Abs)
[AHK v1/v2 'A_' variables]
e.g. BIV: A_PtrSize:
[script.cpp] A_(PtrSize),
[script.h] BIV_DECL_R (BIV_PtrSize);
[script2.cpp] VarSizeType BIV_PtrSize(LPTSTR aBuf, LPTSTR aVarName)
See the demo and potential function/A_ variable links above for more details on adding/modifying BIFs/BIVs.
After editing the relevant source code files, choose 'Build, Build Solution' in Visual Studio (Visual C++), to compile a new exe.
==================================================
TO ADD/ALTER FUNCTIONALITY (AHK V1) (INPUTBOX)
INPUTBOX - FROM FONT SIZE 10 TO 18
[AutoHotkey.rc]
//before:
FONT 10, "MS Shell Dlg", 400, 0, 0x0
//after:
FONT 18, "MS Shell Dlg", 400, 0, 0x0
[script2.cpp]
//before:
CURR_INPUTBOX.font = CreateFont(FONT_POINT(hdc, 10), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
//after::
CURR_INPUTBOX.font = CreateFont(FONT_POINT(hdc, 18), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
==================================================