Skip to content
Fabian Morón Zirfas edited this page Jun 13, 2025 · 3 revisions

includes

To include files you need to save these to scripts with the mentioned names at the same location in the scripts panel or it wont work.

// include a file
#includepath "~/Documents/;%USERPROFILE%Documents";
#include "basiljs/bundle/basil.js";

You can also include files with a relative path.

#include "./relative/path/to/file.jsx"
#include "/absolute/path/to/file.jsx"

If you want to include a file in a function, you need to use eval().

function includeFile(path) {
	var file = new File(path);
	if (file.exists) {
		file.open("r");
		var content = file.read();
		file.close();
		eval(content);
	}
}

The first file called includeme.jsx


Home

Clone this wiki locally