Copies the contents of a file into a hotkey script.


#include path

“#Include” can only appear at the start of a line.


Path is the path to the file to be included. The path must be either fully qualified (in other words, it must start with a drive letter) or it must be relative to the location of the file in which #include is written.


#include marimba.txt
#include g:\eggs\bacon\marimba.txt

If the pathname contains one or more spaces, you must enclose it in quotes:

#include "c:\program files\xylimelts.txt"


Files get included temporarily in the computer’s memory. The permanent copies of the files on your hard disk do not change.

This keyword is extremely useful. For an explanation of what it’s used for, see How to Use #Include.

“#Include” can only appear at the start of a line.

It works the same way in Mojo as it does in C and C++ except that in Mojo it is case-insensitive (it doesn’t matter whether you capitalize the letters or not). Note that it works differently in PHP and some other languages.

This page was first published on January 20, 2018 and last modified on January 27, 2019