Posts Tagged ‘scripting’

“Size By Luminance” a.k.a. Halftones!!! (Wundes)

Tuesday, June 2nd, 2009

[Editor’s note: This new script from John achieves that old fashioned halftone look found in ancient newspapers and magazines.]

Republished from John Wundes’ JS4AI blog.

Want to make halftones in illustrator?

You could go the auto trace route, or you could go with a plug-in from Phantasm. The Phantasm plug-in is powerful and gives you great control, so I do recommend using their product, but if you’re on a tight budget, you can try my new script which is easy, and free.

First off, if you don’t know about the “Mosaic Filter” in Illustrator, read this quick article. The Mosaic Filter is an amazingly under-used feature and it will do most of the heavy lifting for us today. Filter>Create>Object Mosaic

Continue reading at the JS4AI blog . . .

How to Script in Adobe Illustrator (Adobe)

Wednesday, January 7th, 2009

[Editor’s note: I get asked frequently how to get into automating Illustrator via scripting. My favorite language is JavaScript (it’s cross platform) but there is also AppleScript (Mac) and Visual Basic (PC). A listing of all my scripts is here, including my recent script for creating calendars. Adobe does a good job of getting you started with several introductory and intermediate manuals. Plus they even offer a free toolkit application for writing the JavaScripts. The new scripting guides for CS4 are up on Adobe’s site, including how to use Flash panel inside Illustrator to make more interesting graphical user interfaces (or hit testing). There’s new information on using TabStops in there over CS3 and documentation on how to script the new Artboards feature. Give it a try!]

Republished from Adobe.com.

ADOBE ILLUSTRATOR CS4 SCRIPTING

A script is a series of commands that tells Illustrator to perform one or more tasks. Adobe Illustrator CS4 supports scripts written in AppleScript, JavaScript or VBScript. Sample scripts are included in the Adobe Illustrator CS4 installer and get installed with the product. The latest available scripting documentation is provided below:

SAMPLES

Adobe Illustrator CS3 FlashPanel Sample

The FlashPanel sample for Adobe Illustrator CS3 shows how to script Illustrator from Flash using ScriptUI’s FlashPlayer control. The sample illustrates how rich user interfaces created by Flash authoring tools such as Adobe Flex Builder 2 can interact with Illustrator’s scripting object model.

Scripts make multiple artboards in Illustrator CS4 even better (Real World Illustrator)

Monday, November 24th, 2008

[Editor’s note: Mordy Golding at Real World Illustrator shares two tips for working effectively with Adobe Illustrator CS4’s new multiple artboards. One addresses rulers across artboards, the other importing multipage PDFs. Both feature scripts by Shane Stanley, Mac only.]

Republished from Real World Illustrator.

First, while Illustrator does offer multiple artboards within a single document, Illustrator only provides one ruler for an entire document. Meaning that you have a single set of coordinates for the entire canvas, and each artboard in your file shares this. This makes it incredibly difficult to position objects precisely by the numbers when you have multiple artboards in a file. Either you have to continuously reposition the origin point of your ruler (which will also shift the positioning of patterns), or you have to do a whole lot of math. And you know I’m no huge fan of math. What we really need is a set of ruler coordinates for each individual artboard.

Download solution 1 for artboard rulers.

Second, you’d think that with multiple artboards, I should be able to open a multipage PDF document in Illustrator, and have each of the pages turn into artboards. Yes, I know that Illustrator really shouldn’t be used for PDF editing, but in many cases, it’s a great solution for that. Alas, upon opening a multipage PDF file in Illustrator, a dialog box appears asking which single page you’d like to open.

Download solution 2 for importing multipage PDFs.

Continue reading the rest of Mordy’s post at Real World Illustrator . . .

Phantasm CS – Script for Exporting Separations to PDF

Monday, May 12th, 2008

phantasm cs logoI programmed up a little script for Nick over at Astute Graphics that works with his Phantasm CS Illustrator plugin.

(From Nick’s site) PhantasmSepsPDF allows users to quickly and easily generate pre-separated PDF files. By using the PDF layers feature, these files allow users of even the free Adobe Acrobat Reader (download here) to view any combination of inks used in a document. There are many options to customize the script (open it with a text editor).

By using this approach, the following benefits may be gained:

  • The script is free and is very simply to operate; a few clicks and you’re there!
  • It is possible to provide customers with artwork where they may view any combination of ink used in the document (separations) without the need for Adobe Acrobat.
  • By default, Adobe Acrobat and the free Reader version do not display overprints correctly. Pre-separated artwork using Phantasm CS Studio removes this issue, ensuring that your customer will see all technical aspects correctly.
  • The output mimics final printed output very well. Transparencies are flattened where necessary, but leaving as many vector objects in-tact as possible, allowing zooming-in on detail.
  • The original artwork is not immediately accessible, further securing your ownership.

Continue reading and download the script . . .

How Tag Clouds Work (indiemaps.com)

Wednesday, May 7th, 2008

Zach Johnson has a good post about how Tag Clouds work from a cartographic perspective on his indiemaps.com blog. While we have been trained to scale objects based on their area, he concludes tag clouds might be best scaled by size (height) alone.

I have done some Illustrator scipting that take into account the ink area and the raw results are unsatisfactory and must be scaled again by the width of the tag character count to still make visual sense. All this work does not significantly change how the tag cloud is read (indeed, it may make it harder) and must be done in a graphics environment like Illustrator or Flash (not simple HTML).

Read Zach’s full post here…

zack johnson tag cloud

Script: Fit Text Frame to Content (Depth)

Tuesday, April 1st, 2008

ai cs3 logoThis week will be focused on scripts. I have an entire page devoted to those I have created and promote a few others that I find useful to my day-to-day design and cartography work in Adobe Illustrator (go there), especially as a former Freehand user. These scripts extend Adobe Illustrator’s basic functionality thru a cross-platform JavaScript language.

I’ve updated my fitting script (today’s post) and Make Point Type, Find and Replace Graphics, and will unveil my Tag Cloud generating script.

Fit Text Frame to Content (Depth)

Version 2 Beta 1

Important Enhancements:

  1. The text object now remains on it’s parent layer in the same z-stacking order that it was found in. No more error alerts about locked layers.
  2. Expands the text box to fit overset type (before it only shrank the text box)
  3. Option to set how much “extra” buffer to include at the bottom of the box when it is fitted (measured in decimal lines automatically proportional to the type size)
  4. More intelligent about examining rectangular text boxes only (rotated text boxes still need attention)

Download script (3k file size). Installation instructions here.

Please give this script a whirl. Email me with bugs or feature enhancements.

New site, new look

Sunday, November 4th, 2007

In October, I attended the annual NACIS map conference in St. Louis, MO and demonstrated how Adobe Illustrator can be automated via JavaScripting. This can be especially useful for those needing to expand Illustrator’s default capabilities or make Illustrator behave more like the venerable Freehand (may it rest in peace). I created this website to host that presentation, and to capture some of my other projects. Last week Mordy Golding at his Real World Illustrator blog promoted my site and wow, traffic is up. So here’s a new look for a more integrated site.