Categories
Uncategorized

Scripting Illustrator

Adobe Illustrator is actually scriptable… Who knew?

I never thought I would write Javascript for Adobe Illustrator but here we are. A script to rename artboards sequentially.

You can grab the script Rename Artboards.jsx from gist.github.com because it’s simply one file and I didn’t feel like making an official repository for it.

Why? I found that at work I was renaming artboards in Illustrator so they’d have sequential file names/numbers when exporting them as separate PNG images. I got sick of doing it manually and found a solution. Since Illustrator is from Adobe I doubted (at first) that it would be easily scriptable, but hey… it is! Well, with Javascript. Meh. Anyway, it was easy enough to find some sample code that was close enough to what I needed.

I started by looking for a solution. This was my first result: How (to) batch rename artboards in Adobe illustrator?

I assumed Illustrator would have some sort of floating script palette, but no… So then I found: How to keep Illustrator Scripts handy?

That page points to Script Panel 2 and Adobe CC Scripts Panel. I’ve tried them both. I think I prefer the second, but both seem to work fine.

This seems pretty handy, so the next time I need to automate some task in Illustrator I’ll have to dig in and see if it can be solved with a script.