Includes a file in 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. #include must be in lower-case.
Related
#include-once, FileInstall
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.