Automating Adobe Illustrator with AppleScript

"Why on earth would anyone want to script a drawing program?" I'll admit that was my first thought when years ago I heard about a plug-in to add AppleScript support to Adobe Illustrator. I could understand how scripting support was essential for page layout programs. But Illustrator was a program for creating art, involving many design decisions that only a graphic artist could make.

I wasn't alone in that thinking. In this interview, Mark Alldritt of Late Night Software recounts the story behind adding scripting support to Illustrator and getting people interested:

Below, I've included some summary comments about what Mark shared in the interview.

Fortunately, I soon changed my mind about Illustrator after Shane Stanley showed me what could be done to create charts and graphs using AppleScript. I was a Freehand user at the time, but that information led to one of my first Illustrator automation jobs: creating charts for the publications of a state government agency. That project was almost 15 years ago and involved Excel, Illustrator, Photoshop and an early version of InDesign. Here is a short demo of the Illustrator portion of the automation:

Since then, I've done many projects using AppleScript and Illustrator, mostly for the financial industry and with far more sophisticated charts than shown above. But I've also used AppleScript and Illustrator for a variety of other workflows: color replacements in hundreds of documents, importing text and graphics for sophisticated database publishing, preflight and clean-up routines for checking many files, and much more.

Most of my Illustrator projects have been developed under non-disclosure agreements since my clients consider Illustrator scripting to be such an important competitive advantage. The state government job remains the one which I can show. Success stories in automating workflows in Illustrator are remarkable. Most companies recoup the cost of development within a year, and then go on to save a great deal of money and time. Thank goodness Chuck Sholdt saw the potential early on and got Mark interested in developing AppleScript support. We should also thank Adobe for its early interest and continued support over the years, as well as Shane Stanley for all of his example scripts.

More on the interview and Late Night Software

Mark's product, Script Debugger, is simply the best AppleScript tool available and is now in its 21st year of development. His long history as a successful independent software developer is covered in an excellent blog post.

In the interview above, Mark provides many interesting details:

  • He originally looked at developing scripting support for Aldus Freehand, but the program's APIs did not offer enough interaction. That was fortunate, considering Freehand didn't last much longer after being acquired by Adobe.
  • Making sure the plug-in worked on Windows was of primary importance since at that time Apple was considered to be near death.
  • He showed a preview of the plug-in to Sal Soghoian, then new to Apple as AppleScript Project Manager. Sal was "blown away," asking "is this real?" or was it just manipulating layers. It was all real.
  • Sal showed it to Steve Jobs, who then decided to let Sal demo the plug-in at a MacWorld keynote. That got Adobe's attention, and Mark signed a letter of intent with Adobe behind the curtain during Sal's keynote demo. Great story!
  • Funds from the sale to Adobe allowed Mark to continue development of Script Debugger, even though at that time Apple's future was very questionable, to say the least.
  • Besides the money, work on the plug-in led Mark to develop the basis of one of Script Debugger's best features: The Dictionary Explorer. Because he was "too lazy" to write scripts to test all functions, he needed a live way to look at an AppleScript dictionary.
  • Script Debugger 6 development is ongoing, with a general plan to release it after Mac OS 10.11 becomes available. Yes!

With Adobe Illustrator, we see once again that when a developer chooses to add scripting support to a program—even a drawing program—users can end up doing remarkable things.

-Ray Robertson