#include preprocessor works on ExtendScript but not in Illustrator as standalone script
Hi!
When I do an include of a jsx file (that is on the same folder as the main jsx), everything works fine running from ExtendScript.
If I copy the files to the Illustrator's scripts folder and run it from Illustrator, nothing happens.
I tried adding different preprocessors to the file I want to include, but solved nothing.
If I copy the code to the main file, everything works as intended.
I also tried having all my code on the main file, and add a include to an empty file. When I do this, I no longer can run the script. Which makes me think that is something related to preprocessor directives. Maybe ExtendScript adds something that I'm missing.
Booth files are on the same folder and the code is something like:
/*
* The main jsx
*/
#target illustrator
#targetengine main
#include "thingToInclude.jsx"
main();
function main()
{
// The GUI code
}
/*
* The jsx to include
*/
#target illustrator
function bridgeTalkMessage()
{
// Bridgetalk Code
}
function functionForBridgeTalk()
{
// function for BridgeTalk
}
Thanks!
