How do I go about learning how to write scripts for illustrator?

Explorer ,
Nov 24, 2020 Nov 24, 2020

Copy link to clipboard

Copied

Hi community


A beginner here.


① How do I go about learning how to write scripts for illustrator?
② What sources are there for this?
③ How long does it take to become proficient at this (a guesstimate)?
④ What advice do you give to a beginner?


muchas gracias

TOPICS
How to, Scripting

Views

194

Likes

Translate

Translate

Report

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
Explorer ,
Nov 24, 2020 Nov 24, 2020

Copy link to clipboard

Copied

To answer 1. and 2.:
The scripts brought by the application itself, for example
Illustrator-Installation/Scripting/Sample Scripts/JavaScript
are in fact some kind of teaching-book.
Take a look at the source, it's well documented.
However the examples are not in any order of complexity.
The short ones give you a good insight how wide spead the themes are.
3. It depends on your time and energy. It feels like I am still a noob.

Likes

Translate

Translate

Report

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
Explorer ,
Nov 26, 2020 Nov 26, 2020

Copy link to clipboard

Copied

Thanks.  I will check them out. 

Likes

Translate

Translate

Report

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 Community Professional ,
Nov 24, 2020 Nov 24, 2020

Copy link to clipboard

Copied

Welcome to the "quest". I've been trying to learn how to script for Illustrator for about 2+ years. This is after 32 years of using Illustrator.

First, have you chosen a scripting language? I chose ExtendScript (Javascript for Adobe products) because it is cross-platform and there seems to be more reference for it. I use this site every day:
https://illustrator-scripting-guide.readthedocs.io/


I started though, by learning the basices of JavaScript by watching several Training Videos on Lynda.com. You may be able to access it for free through your local Library account:
https://www.lynda.com/JavaScript-tutorials/JavaScript-Essential-Training/574716-2.html

But the BEST resource I've found is this forum!! The scripting gurus here are very willing to help a beginner.

It seems daunting at first, but in a few months you'll be amazed at what you've learned. 

Likes

Translate

Translate

Report

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
Explorer ,
Nov 26, 2020 Nov 26, 2020

Copy link to clipboard

Copied

Thanks.  I will check them out. 

Likes

Translate

Translate

Report

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 Community Professional ,
Nov 24, 2020 Nov 24, 2020

Copy link to clipboard

Copied

Hi cute, 

 

① How do I go about learning how to write scripts for illustrator?

read the official guides, watch video tutorials, ask question here, read books, dive in and start messing with it. What's your style of learning other stuff?
② What sources are there for this?

same as above
③ How long does it take to become proficient at this (a guesstimate)?

I'd say 2-3 years you should be ready to write scripts for others. But nothing stops you from practicing like a mad person and be ready in 6 weeks.
④ What advice do you give to a beginner?

practice, practice, practice...

 

Likes

Translate

Translate

Report

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
Explorer ,
Nov 26, 2020 Nov 26, 2020

Copy link to clipboard

Copied

Thanks Carlos.  Any specific video tutorials you suggest watching?  The same for books? 

Likes

Translate

Translate

Report

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 Community Professional ,
Nov 26, 2020 Nov 26, 2020

Copy link to clipboard

Copied

here's world famous Ethan Wilde book, it's very outdated, but if you enjoy books it's still relevant for the most part.

https://www.thriftbooks.com/w/adobe-illustrator-scripting-with-visual-basic-and-applescript_ethan-wi...

 

it's vb and applescript though, if you're starting you should learn Javascript, it's crossplatform.

Here's the only other book I know about, it's old as well

https://www.thriftbooks.com/w/adobe-scripting-your-visual-blueprint-to-scripting-in-photoshop-and-il....

 

check this channel, NT Productions for video tuts

https://www.youtube.com/watch?v=EGdgrP7azUQ

 

Learn how to begin writing scripts for Adobe Illustrator and create a useful first script!---------------------Script Code: https://github.com/NTProductions/...

Likes

Translate

Translate

Report

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
Explorer ,
Dec 05, 2020 Dec 05, 2020

Copy link to clipboard

Copied

Thanks Carlos.  I will definitely check them out.

Likes

Translate

Translate

Report

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
Enthusiast ,
Nov 26, 2020 Nov 26, 2020

Copy link to clipboard

Copied

The thing to be aware of is that, unless you've already learnt programming, you will be trying to learn two concepts at the same time. The first is programming and the second is applying programming to solve Illustrator problems. So I would start with learning programming basics. My introduction to JavaScript was through a little book titled "Make: Getting Started with p5.js" by Lauren McCarthy. That can be read in a couple of weeks. 

Likes

Translate

Translate

Report

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
Explorer ,
Dec 05, 2020 Dec 05, 2020

Copy link to clipboard

Copied

Thanks.  I will check it out.

Likes

Translate

Translate

Report

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 Community Professional ,
Nov 28, 2020 Nov 28, 2020

Copy link to clipboard

Copied

As someone who started not on a programmer path, Illustrator scripting is how I got into a much broader range of technologies from 9 years ago. My first 'real' job was intense and I had to learn scripting to save my poor arm from the typing needed in daily tasks as a production art person.

Back then, resources were more limited and scripting capabilities were more limited than in later versions of Illustrator. However, the software was seemingly more stable and you used to be able to create scripts that would last a long time before some new Adobe change broke them. Also, as others have pointed out, javascript is the cross-platform easiest-to-learn language the general skills of which can be carried over into web design and other Adobe apps. The thing with "ExtendScript", Adobe's javascript is that it's following a really old version of javascript that doesn't have all the same features as the javascript they use in web design. So back in the day, the difference of ExtendScript and the latest javascript kind they ran in browsers was kind-of small compared to what it is now. Additionally some front-end UI design frameworks started to make their own syntax on top of javascript and even encroached on Adobe's ExtendScript file extension of ".jsx" which to us means an Adobe javascript document but a React.js document for a web designer.

So thing brings me to the next point of the code editor because previously we had Adobe's trusty ESTK (ExtendScript Tool Kit) to rely on, and it had syntax checking for exactly that archaic ES3 style of javascript Adobe uses. But as pointed out by others, this will be going away in some OSs soon and all the rest - eventually. So now we have VSCode editor with an "ESTK" Plugin that is used to sort of replicate the old ESTK in a new code editor. And this new code editor probably has some settings to change the syntax for just .jsx extensions in just certain foldres - but I have been too lazy to investigate. Basically, with new complex stuff there's a new learning curve compared to just using the old ESTK if you are still able to.

 

I'm going on doing some form of scripting for 10 years, and it took probably 5 years to be proficient. This being said, math-oriented stuff I don't do myself as much as I can and I just ask others for advice to implement a common stackoverflow answer to my needs. The first month or two of learning were especially frustrating because I originally began without watching any javascript videos and trying to create my ideal script for that time by pasting snippets from the forum. Using a Head-First javascript book, I slowly also learned some of the basics to make some rudimentary edits to the online snippets and produced some basic results. While in the short-term this was highly exhillarating, I found that I had authored something doomed to fail. Therefore there came a point when I knew that it was in my best interest to tear my work down and start completely over using my experience. After the first month I discovered the Lynda.com tutorials for javascript and it helped a lot because the videos were short and dealing with a specific subject at a time. All the while I needed to be aware of the Adobe vs modern browser javascript differences.

 

My advice for beginners in Adobe scripting is to keep watching the web-javascript tutorials but also to go to their local half-price books (if there's some in your country or the equivalent thereof) and also try to locate ancient tutorials for really old browser javascript. Those will still have browser features you can't use, but they will have syntax more similar to the Adobe ExtendScript one. Additionally any google search or stack-overflow search for Adobe ExtendScript will yield applicable results - but early on you should get the sense for what the difference between the javascript versions is. To make work inside VSCode faster, learn JSDoc which will help your VSCode have intellisense and auto-complete your code as you type it. While this is not available in ESTK, you can still have JSDoc comments in your old-style files and ESTK will work normally while VSCode will give the extra benefit of auto-completion, but in all cases the comments will help to document your work.
Then, after mastering basic scripting you can expand into using TypeScript which is a way to super-charge your work by making javascript act more like a back-end object-oriented language and creating CEP extensions which can use browser javascript and Node.js server-side javascript in addition to ExtendScript javascript.

Also, while my work touches on any number of diverse software technologies I am hardly a master of all and find myself relying on others for help, new users who ask better questions and give better answers and also google basic questions that I should already have known!

Good luck and have fun!

Likes

Translate

Translate

Report

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
Enthusiast ,
Nov 29, 2020 Nov 29, 2020

Copy link to clipboard

Copied

"The thing with "ExtendScript", Adobe's javascript is that it's following a really old version of javascript that doesn't have all the same features as the javascript they use in web design."

 

I find that this, "retro programming" so to speak, adds mystique and charm to the experience. I feel like I'm learning programming in 1999. Also, a positive side-effect is that I am forced to sift through the syntactic sugar of the latest versions and, through shims and polyfills, go back to basics.

Likes

Translate

Translate

Report

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
Explorer ,
Dec 05, 2020 Dec 05, 2020

Copy link to clipboard

Copied

Thanks for the details reply Silly.

Likes

Translate

Translate

Report

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 Community Professional ,
Nov 28, 2020 Nov 28, 2020

Copy link to clipboard

Copied

I should note, my initial experience with automating Illustrator did not involve scripting at all. I used Keyboard Maestro, a Mac-only app, to write simple macros that did basic automated tasks in Illustrator (and any other application). As my experience and confidence grew I branched out into scripting and incorported them into the Keyboard Maestro (KM) macros. KM allows me to assign "triggers" to any script, making it easy to encorporate them into a larger workflow.

Likes

Translate

Translate

Report

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
Explorer ,
Dec 05, 2020 Dec 05, 2020

Copy link to clipboard

Copied

This has been some good advice. If anyone else has any more ideas please share.

Likes

Translate

Translate

Report

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
Contributor ,
Dec 07, 2020 Dec 07, 2020

Copy link to clipboard

Copied

LATEST

Yeah, thanks guys, all great stuff.

I used to write everything in applescript because it was relatively easy modified English and I only used Macs, but now I have to use PCs for work.

I can edit js, and add in a few bits and pieces for my needs, but writing from scratch takes me aeons, i just don't get the syntax - sorry, old dog.

But I'm going to take a look at these resorces - thanks again.

Likes

Translate

Translate

Report

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