Site logo

#include, #includepath (load library)

You can add one or more paths after the #include statement separating them by the semicolon (;)

#includepath "~/Library/Preferences/Adobe InDesign/Version 5.0/Scripts/Scripts Panel;~/Application Data/Adobe/InDesign/Version 5.0/Scripts/Scripts Panel"  
#include "_firstScript.jsxinc"

Here is another way to get the glue code (or another library):

// Locate and run the glue code.jsx file  
var myFilePath = app.filePath + "/Scripts/xml rules/glue code.jsx";  
if(File(myFilePath).exists == false){  
     myFilePath = File.openDialog("Locate the file: glue code.jsx");  
if(myFilePath != null){  
     var myFile = File(myFilePath);  
function main() {  
     // do something here