My intention is to create a script for Adobe Illustrator which calls a compiled C executable I wrote with some input parameters.
The C executable (named 'crowd-generator') will generate and return an array of x,y co-ordinates based on the input parameters.
As far as I can tell from the research I have done so far, I should be able to execute the code like this (ignoring input parameters for now):
#include crowd/crowd-generator
var script_file = new File('crowd/crowd-generator');
var result = script_file.execute();
However, all this seems to do it to open my executable file in ExtendScript and then tell me it has syntax errors in it, which it definitely doesn't. I think perhaps it is trying to run it as a .jsx file.
One thing I have tried is giving 'crowd-generator' a .app or .exe file extension. The only difference this makes is that when trying to run my script, I get a dialog box asking me what language the executable is in... then it gives me a syntax error anyway whatever I choose.
What is going wrong? Is there any way to run this executable from a .jsx file run in Adobe Illustrator?