Page 1 of 1

C++: AHK source code: where is it located?

Posted: 16 Nov 2018, 09:26
by jeeswg
I have done a read-through of the AHK source code.

I have identified the locations of key parts of the source code in other threads:
AutoHotkey C++ Powerhouse: Introduction - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 23&t=54394
C++ for AutoHotkey: list of command/function locations etc - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 23&t=55399

But I have some queries. Thanks for any help. I am looking for:

point where (general):
- AHK starts [is it: AutoHotkey.cpp] [what is the first line of code executed?]
- AHK ends [is it: script.cpp: Script::TerminateApp]
- script parsed (e.g. commands/functions) [is it: script.cpp: Script::LoadFromFile]
- (what lines of code are running while the script is 'doing nothing')

point where (specific):
- hotkeys identified [is it: script.cpp: Script::LoadFromFile] [but more specifically]
- hex numbers identified (e.g. 0xFFFF)
- variable capacity doubled (e.g. when appending text)
- AHK objects binary lookup [are pre-existing C++ array types used at all?]

point where (I think I found it):
- ahk_XXX parsed [window.cpp: WindowSearch::SetCriteria]
- command-line arguments parsed [AutoHotkey.cpp: A_Args]

Re: C++: AHK source code: where is it located?

Posted: 28 Nov 2018, 14:55
by iseahound
+1 I'd like to know this too. It would help when I take a look at the AHK source someday.

Re: C++: AHK source code: where is it located?

Posted: 29 Nov 2018, 03:46
by nnnik
You can find the lookup at script_object.cpp:FindField

Re: C++: AHK source code: where is it located?

Posted: 02 Dec 2019, 23:45
by jeeswg
Re. where it starts: the 'main' function is called _tWinMain, which corresponds to wWinMain (Unicode) or WinMain (ANSI). See tchar.h.

Link:
Can't Understand Source Code - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=65399