addFile is used to append additional labels and functions from a file to the running script.
pointerLine:=DllCall(dll_path "\addFile","Str",file[,"Uchar",AllowDuplicateInclude,"Uchar",IgnoreLoadFailure],"Cdecl UPTR")
| Parameter | Description |
| pointerLine | addFile() returns a pointer to the first line in the late included script. |
| file | name of script to be parsed and added to the running script |
| AllowDuplicateInclude | 0 = if a script named %filename% is already loaded, ignore (do not load) |
| IgnoreLoadFailure | 0 = signal an error if there was problem addfileing filename |
Line pointer can be used in ahkExecuteLine() to execute one line only or until a return is encountered.
AutoHotkey.dll, ahkdll, ahktextdll, ahkReady, addScript, ahkExec, ahkLabel, ahkFunction, ahkPostFunction, ahkassign, ahkgetvar, ahkTerminate, ahkReload, ahkFindFunc, ahkFindLabel, ahkPause, ahkExecuteLine, Alias, cacheEnable, FindFunc, FindLabel, getTokenValue, getVar, Static, AutoHotkeyMini, DynaCall, CriticalSection, CriticalObject, MemoryLoadLibrary, ResourceLoadLibrary, MemoryGetProcAddress, MemoryFreeLibrary, Other Changes
AhkDll:=AhkDllObject("AutoHotkey.dll")
AhkDll.ahktextdll() ;Starts empty thread in #Persistent + #NoTrayIcon mode
If ahkDll.addFile("MyScript.ahk") ;add but do not execute
MsgBox Script was added`nPress OK to exit
else
MsgBox Could not add script