Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

What language would you recommend for scripting

Community Beginner ,
Sep 07, 2021 Sep 07, 2021

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!!

TOPICS
Scripting , SDK
1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Guide ,
Sep 07, 2021 Sep 07, 2021

For direct scripting in Illustrator:  JavaScript. 

For creating plug-ins:  C++.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 07, 2021 Sep 07, 2021

Thanks for the prompt reply. Can I still exciute plugins with C++ ? I see the files supported include .exe.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Sep 07, 2021 Sep 07, 2021

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 07, 2021 Sep 07, 2021

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 ??

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Sep 07, 2021 Sep 07, 2021
LATEST

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++!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines