Copy link to clipboard
Copied
I would like to include a script in a script... but this won't work please help.
var loadvars = File(app.path+'/Infopanel/Contents/Vars/vars.jsx');
#include loadvars
Thanks Daniel
Copy link to clipboard
Copied
You haven't included a lot of information, but perhaps you could include it in the same script as a function and call it when you need it.
info on using functions\/
Copy link to clipboard
Copied
See Preprocessor Directives in the Toolkit Guide… The #include wants a file name string not a File Object.
I think it will default to Folder Current ( where the calling script is ) otherwise you will need to specify relative path using #includepath
#target illustrator
#include 'myScriptName.jsx'
//#includepath 'aRelativePath'
testMyExternalFunctions( 'muppet' );
#target illustrator
function testMyExternalFunctions( mess ) {
alert( mess );
};