Posts Tagged ‘wundes’

“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 . . .

James Talmage’s Great Illustrator Scripts

Wednesday, February 25th, 2009

[Editor’s note: James has some great scripts that bring Freehand functionality into Illustrator. Ones I like are a better “replace with symbol” script than mine or John’s. Another draws legend boxes for each color used in the artwork. Two others add the ability to deselect paths that were only partially selected, or to select the unselected portions of paths is awesome. Thanks John vdH!]

Republished from James Talmage’s site.
View all of Jame’s scripts.

You’re a graphics person, right? Conventional wisdom says you’re a decidedly right-brained person. You use Illustrator to draw things, not to mess with cryptic code.

Maybe. But even if you’re the kind of Illustrator user who steers away from rulers, snaps, and numerically-entered values, and instead dives right for the Paintbrush, Symbol Sprayer, and Warp Tool, you still use Illustrator to get graphic things done and to use its features and commands. Scripting enhances both of those things.

Let’s face it: Repetition gets old, fast. It’s long been said that necessity is the mother of invention. I tend to think most cool inventions are the offspring of that cranky old couple, Laziness and Boredom. Some of the scripts in this collection arose from the shamelessly selfish desire to end the repetitious tedium of certain tasks.

But isn’t automation what Illustrator Actions are for? Well, yes. But Illustrator’s Actions Palette lets you create mere “macros.” With Actions, you can record and play back a series of most operations that you would normally perform by using the tools and commands that are directly accessible in Illustrator’s user interface. But scripts allow you to do more.

New Functionality
If little Invention was borne of daddy Laziness and mommy Boredom, he’s also been at least baby-sat by cousin Curiousity. Many of the scripts shared here were self-inflicted experiments, inspired by comments, complaints, and double-dog-dares in the Illustrator User-to-User Forums where I often hang out for recreation.

Scripting can enable you poke around a bit “under the hood” of Illustrator’s user interface, and manipulate many things from which the normal interface isolates you. For example, did you know that…

  • An Illustrator file has an internal list referred to as the “inkList” which determines the color separation plates?
  • A path can be designated closed or open, regardless of whether the whole path or just a part of it is selected?
  • You don’t have to settle for merely defining an ellipse in terms of the height and width settings of the Ellipse Tool’s dialog; you can define it like a technical illustrator often wants to: in terms of size and angle?

So it’s about more than merely automating repetitive tasks. It’s also about doing things which can’t be done with the normal feature set. Scripting effectively lets you add your own new “features” to Illustrator. All it takes is an ulterior motive, a little experimentation, and a bit of creativity. See? You don’t have to turn off the right side of your brain, after all.

Which Scripts of James’ Nathaniel Recommends:

  • Cleanup Scripts (zip | html)
  • JET_FixRegColorFromFH.jsx
    When opening a FreeHand file, Illustrator fails to assign AI’s [Registration] swatch to paths and text having FreeHand’s Registration swatch. Instead, it imports FH’s Registration swatch as a process swatch.
  • JET_RemoveSegmentsShorterThan.jsx
    Reduces the number of anchorpoints on selected paths, according to a minimum specified by the user. Removes from each selected PathItem, segments shorter than the measure entered by the user. Useful for certain types of path simplification and cleanup chores, as in imported DXF files.
  • JET_RemoveShortSegment.jsx
    General path simplification. Allows the user to specify the minimum number of segments to be retained. This script removes the shortest segment from each selected PathItem that has more than the number of segments entered by the user.
  • JET_RemoveShortSegmentsUntil.jsx
    General path simplification. Allows the user to specify the number of segments to be left for each path. This script repeatedly removes the shortest segment from each selected PathItem until the number of segments is no more than the number entered by the user.
  • Draw Scripts (zip | html)
  • JET_Centroid.jsx
    Finds the centroid (center of gravity) of selected triangles and other straight-sided multigon paths and draws a user-defined circle at that location. To use, make a selection which includes normal paths. Then call the script.

  • JET_ReplaceWithSymbol.jsx
    Replaces selected items with Instances of a Symbol from the Symbols Panel. The desired Symbol can be defined by its index number (its number of occurrance in the Panel). The document must have at least one Symbol defined. Simply select some objects. Then run the script.

  • Label Scripts (zip | html)
    Creates a series of labeled squares at the bottom left of the Artboard, each filled with one Swatch in the Swatches Panel. Useful for adding a “color legend” on pages of identity graphics, to specify colors. For each named Swatch in the Swatches Palette, the script draws a square filled with the Swatch color, and creates beside it a PointType object containing the name of the Swatch. The text labels are filled with Registration color. A prompt allows the user to set the desired size of the squares (in points). The label text size is 1/3 the size of the squares.

  • Path Scripts (zip | html)
    (Various scripts)
    The batch of scripts I call PathScripts are those which manipulate paths, anchorPoints and handles. Most of these are my cheezy workarounds for features which FreeHand users take for granted, but which Illustrator still lacks.
  • Selection Scripts (zip | html)
    It’s no secret that Illustrator’s path/point/handle selection interface is just about the most cumbersome of all. In fact, only the most devoted Illustrator-only users deny it. These scripts are mere workarounds for some of the awkward selection chores; but they do make life a little easier in a few common situations.
  • JET_SelectSameLength2ptPaths.jsx
    Selects paths in the document which have 2 points and are the same length as the currently selected 2-point path. Purpose: to select the individual dashes of dashed lines which commonly come into AI from converted DXF files. Useful for removing “hidden lines” from such files.

  • JET_MarqueeDeselectPartials.jsx
    RWhen making marquee selections in Illustrator, all objects crossed or touched by the selection marquee are selected. Unlike most other drawing programs, Illustrator does not provide a Contact Sensitive toggle setting to cause marquee selection to select only objects which are fully enclosed by the marquee. This script deselects paths in the current selection which are only partially selected.

  • JET_MarqueeSelectRest.jsx
    When making marquee selections in Illustrator, all objects crossed or touched by the selection marquee are selected. Unlike most other drawing programs, Illustrator does not provide a Contact Sensitive toggle setting to cause marquee selection to select only objects which are fully enclosed by the marquee. This script finds paths in the current selection which are only partially selected, and adds their unselected points to the selection.
  • Transform scripts (zip | html)
    Transformation Scripts is another category for which I anticipate hacking out additional scripts. One can imagine a wide range of re-iterative transformation routines, applicable at the object/path/points/handles level beyond those already in Illustrtor’s feature set.
  • JET_StackTopToBottom.jsx
    This script re-stacks the selected objects according to their vertical positions, top to bottom. After running the script, the selected object positioned highest on the page will be rearmost; the one lowest on the page will be frontmost. This is mainly useful for correcting the stacking order of individual PointType textFrames in imported CAD drawings before concatenating them into a single AreaType textFrame, as in a parts list.

Illustrator Script: Gimmie an Eye! (Wundes)

Tuesday, February 24th, 2009

John Wundes has a new script for Adobe Illustrator called “Gimmie an Eye!”, useful for the artists among us. It creates eyes with random characteristics for color, shape, and iris. Each eye is grouped, and both eyes are grouped together. No manual settings are available. If you don’t like the output, just make another set until you find something you like. 

Download JSX. View HTML page for script.

To install and use new scripts you have to:

  • Quit Illustrator
  • Copy the files into the Illustrator application folder’s “Presets” » “Scripts” subfolder
  • After restarting Illustrator you can find the scripts in the menu “File” » “Scripts”;
  • TIP: You can create subfolders in the scripts folder to organize your scripts

Illustrator Script: SelectPathsBySize.jsx (Wundes)

Monday, February 23rd, 2009

[Editor’s note: John Wundes has updated his Select Path Items script for Illustrator. It still needs the ability to select by number of path points (see my script for that: page, download), but it has other very nice options, including a GUI exposing all the settings. Good job, John!]

Republished from John Wundes’s js4ai blog (1 | 2).

Download script (download page).

Updates in version 3

  • Rebuilt the processing engine from scratch, and now it is much faster.
  • There is also now a floating text field that updates as pathItems are processed in real time. This way, it still may take a long time to finish, but at least you have a very rudimentary progress bar to let you know that the system hasn’t taken a dump on you.
  • It also tells you when it’s complete, and reports the total processing time.

Updates in version 2

  • More Selections: Rebuilt interface to select objects based on Size, Area, Width, or by Height.
  • Exact Same Size: Added “Exact” option to the “less than” and “more than” radio-buttons (Thanks to Nathaniel for that suggestion)
  • Default Selection: If one object is selected, starts threshold at that size. (Also thanks to Nathaniel’s input…)
  • Added Tool Tips: If you mouse-over the dialog elements, you now get helpful tooltips. (Now I just need someone to help me translate them into other languages…)