Copy link to clipboard
Copied
Hows it going guys. I was wondering what language would be best for scripting if Adobe Illustrator. I know a little javascript and a little C++. I am willing to study one of the languages a little more but I am trying to pick a lane. How do people interface with Adobe Illustrator via C++? I must be missing something conceptually. I would like to continue learning C++ but it seems like javascript is more established. Let me know what you guys thing.
Thanks for reading!!
Copy link to clipboard
Copied
For direct scripting in Illustrator: JavaScript.
For creating plug-ins: C++.
Copy link to clipboard
Copied
Thanks for the prompt reply. Can I still exciute plugins with C++ ? I see the files supported include .exe.
Copy link to clipboard
Copied
You make plugins using C++ and execute them via the application when the plugin is installed, to my knowledge.
Otherwise you can execute a script or plugin using any language that can execute a file:
For javascript, this is done by executing the javascript file within the context of the Illustrator application: example is VB and its "DoJavaScript" method. VB has type library support for Illustrator, so it can work.
For executing a C++ plugin, same thing, and inside javascript there is a special "sendScriptMessage" function which can take some arguments and relay them from javascript into the application which can then pass the to a C++ plugin. Typically this works good because it takes a lot more time and technical knowledge to do C++, but not as much when doing Javascript: a C++ person can create low-level features which a JavaScript person can quickly utilize using their JavaScript skills in many different ways. As an example, a C++ plugin can do something complex and impossible with regular scripting, but a script can take that feature and run it inside of a loop.
Copy link to clipboard
Copied
Ok cool I see what you are saying. So javascript is the language of choice for scripting because the learning curve is not as steep and is less complex to intergrate into AI. But C++ can create complex features and objects that can be ported to javascript and utilized over and over. But at the end of the day one can use both languages as scripts and only C++ for plugings. Am I following this correctly ??
Copy link to clipboard
Copied
Yea, except you can't use C++ as scripts, only scripts as scripts and those can potentially also control any C++ plugins too.
As far as doing most of regular available Illustrator features with automation, Javascript is going to get you up and running immediately. I actually have messed with scripting for 10 years so far, but hardly with C++!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now