Includes a file in the current script.
#include "[path\]filename"
#include <filename>
Parameters
| filename | The filename of the current script to include. Path is optional. This must be a string--it cannot be a variable. If "..." is used, the filename is taken to be relative to the current script. If <...> is used the filename is taken to be relative to include library directory (usually C:\Program Files\AutoIt3\Include). The include library contains many pre-written user-functions for you to use! |
Remarks
In an AutoIt script, other scripts can be included using the #include" command.| Standard library | The path of the currently running interpreter with "\Include" appended is searched. |
| User-defined libraries | The registry value mentioned above is read and each directory is searched in the order they appear in. |
| Script directory | The directory of the currently executing script. |
| Script directory | The directory of the currently executing script. |
| User-defined libraries | The registry value mentioned above is read and each directory is searched in the reverse order they appear in. |
| Standard library | The path of the currently running interpreter with "\Include" appended is searched. |
Related
#include-once
Example
;;; TIME.AU3 ;;;
MsgBox(0,"", "The time is " & @HOUR & ":" & @MIN & ":" & @SEC)
;;; SCRIPT.AU3 ;;;
#include "TIME.AU3"
MsgBox(0,"", "Example")
#include "TIME.AU3"
Exit
; Running script.au3 will output three message boxes:
; one with the time, one with 'Example', and another with the time.