Import() [AutoHotkey.dll or AutoHotkey_NL30N7+]


loads and compiles additional script files dynamically

LinePointer := Import(filename, [aAllowDuplicateInclude = 0, aIgnoreLoadFailure = 0])

Parameters

LinePointer Import() returns a pointer to the first line in the imported script.
filename name of script to be imported
aAllowDuplicateInclude see Include command
0 = if a script named %filename% is already loaded, ignore
1 = load it again
aIgnoreLoadFailure see Include command again
0 = signal an error if there was problem importing filename
1 = ignore error
2 = remove script lines added by previous calls to Import()

Examples

linePointer := Import("filename")  ; adds a new include file named filename, and returns linepointer
linePointer := Import("filename", 1, 2)  ; clears all loaded functions and labels, then adds a new include file named filename, and returns linepointer