0
Your Cart
No products in the cart.

Jessica Del Grande
Follow
--
2
Listen
Share
I’ve recently rediscovered Adobe Creative Cloud (and by ‘rediscovered’, I mean that I’ve got a licence through my work that brings me no end of joy), so I’ve been re-learning some of the Creative Suite programs. The last time I was intimately familiar with Illustrator was in CS…3 maybe? I assumed that Adobe had since made CSI-like effects possible with the tap of a single button, so I was eager to take this baby from zero to a whole bunch of icons in 60 seconds.
Part of my job involves making icons, and there’s never just one colour of an icon — there are resting states, hover states, active states, open states, closed states….so I always need to make the same icon in several different colours.
I created one Illustrator file and put each colour on its own layer because I figured there was a function somewhere that would save each layer in a separate file. After opening every menu and doing some googling I discovered that this feature doesn’t exist. But! I also discovered that JavaScript plays really well with Illustrator — who would have thought?! By writing (or borrowing, let’s be real) some not-too-complicated scripts, you can have your artwork practically saving itself!
There are some scripts that come built into your Illustrator, but the real secret to owning this script thing is an extension that Adobe calls ESTK — ExtendScript Toolkit — that allows you to write your own scripts. I understand that it used to be bundled with AI but starting with CC you need to download it separately. You can find it in the Extensions section of your Creative Cloud dashboard.
Once you’ve got ESTK installed, open it up. Choose Adobe Illustrator and your version from the dropdown in the upper left corner. And here’s where the fun starts!
You can write your own scripts using the available documentation (always read the docs!), or you can thank the stars for the amazing open-source tech community and find yourself a well-written script that already does the thing you have spent all day trying to do. I found a few different options online, and this is the one I used:
I’d love to take credit for this genius script, but there are some wizards out there who did the heavy lifting long before I even knew that this kind of power existed. This particular work of art was scripted by CarlosCanto and posted to Adobe Forums.
In the spirit of never just copying-and-pasting things that we don’t understand: the script basically runs forEach loops through your file. Every time the script hits a layer a new file is created. Each new file is given the name of the original file, a number that corresponds with the layer number, and saved as a .png.
Here’s how to watch this magic in action:
If you’re super scripty, you could read through the docs and tweak the script to name the files with the layer names, or you could change the order that the layers are saved, or probably lots of other things. I’m really happy with this (relatively) basic script for now — it saves me all kinds of time. Hopefully you’ll get as much use and joy out of it as I do!
--
--
2
Web Developer, @junocollege alum (cohort 13).
Jessica Del Grande
--
2
Jessica Del Grande
--
Jessica Del Grande
in
Geek Culture
--
Jessica Del Grande
--
1
Adham Dannaway
in
UX Planet
--
165
Mirijam Missbichler
--
222
AL Anany
--
446
Benoit Ruiz
in
Better Programming
--
211
Scott-Ryan Abt
in
Pitfall
--
310
Emmanuel Odii
--
66
Help
Status
About
Careers
Blog
Privacy
Terms
Text to speech
Teams

source