Skip to content

joshbduncan/illustrator-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adobe Illustrator Scripts

Welcome to my playground for Adobe Illustrator scripting. Along with the scripts and utilities detailed below, you can also find some fun tests and example scripts in the snippets directory. Have fun! ✌️

Getting Started

  1. Download the repository ZIP archive to your computer.
  2. Install script files from the jsx directory into your Presets folder (learn how).
  3. Restart Illustrator.

Script Categories

Alignment Scripts

MatchObjects

Download

Match one or more objects to another by size, position, rotation, and more.

MatchObjects

OffsetObjects

Download

Offset selected objects vertically or horizontally by stacking order or artboard placement.

OffsetObjects

Artboard Scripts

ArtboardFloodFill

Download

Flood fill the active artboard with the current fill color.

ArtboardFloodFill

ArtboardRectGuides

Download

Easily add a rectangle guide offset +/- from your current artboard.

ArtboardRectGuides

ArtboardsToAi

Download

Export all artboards to individual Ai files.

ArtboardsToPDF

Download

Export all artboards to individual PDF files.

ArtboardToAi

Download

Export the current artboard to an Ai file.

ArtboardToPDF

Download

Export the current artboard to a PDF file.

Color Scripts

ColorRandomly

Download

Randomly color selected objects.

Features:

  • choose between Full RGB, a single color (adjustable tints), or grayscale values
  • works with text words or individual characters

ColorRandomly

Layer Scripts

RenameLayers

Download

Rename layers using find and replace (regex enabled).

RenameLayers

ShowHideLayers

Download

Show or Hide layers in Adobe Illustrator using find (regex enabled).

ShowHideLayers

Path Scripts

EditPointsOnly

Download

Sometimes when selecting path points using the Direct Selection Tool or Lasso Tool, path segments also get selected making anchor point manipulation difficult. This script selects only the path points (not path segments) from your current selection.

RemoveBezierHandles

Download

Remove bezier handles from selected anchor points.

Production Scripts

ExportPrintCutPDFs

Download

Export proper print and cut PDFs for decal and signage production.

Note

This script was created specifically for a decal vendor I work with and is not currently customizable so it may not fit your exact requirement but can easily be adjusted. Let me know if you need any help?

ExportPrintCutPDFs

RepeatAfterMe

Download

Easily repeat Illustrator objects across row and columns (with visual preview). Useful for production layout, grid/pattern generation, and step-and-repeat operations.

Includes:

  • Customize rows, columns, and gutters
  • Repeat pattern options grid, brick-by-row, brick-by-column
  • Ability to save presets, with customizable default and last used settings
  • Pick different object bounds to base layout from
  • Option to fill active artboard with repeats (with padding)

RepeatAfterMe

ScreenSepMarks

Download

Easily add screen printing registration marks and spot color info to a document for printing separations.

Includes:

  • Customize registration mark size, placement(s), color, and inset
  • Label film separations with spot color name
  • Output can also include file name and timestamp
  • Can be re-run at any time to update data
  • Ability to save custom presets

ScreenSepMarks

ScreenSepMarks

Selection Scripts

SelectObjectsByName

Download

Easily find and select objects in your Adobe Illustrator document by name. Supports both simple string searches and powerful regular expression matching. Ideal for quickly filtering and managing complex artwork layers and groups.

SelectObjectsByName

Text Scripts

FontVisualizer

Download

Visualize every font on your system with customizable text.

FontVisualizer

Note

Depending on the number of fonts on your system, this script can take a while to complete. If you want to speed things up, you can change the setting updateScreen = false. For example, to process all 2500 fonts on my system, it takes 2 minutes with the default settings. With updateScreen set to false, the processing time reduces to 20 seconds (83% time decrease).

Utility Scripts

DrawVisibleBounds

Download

Draw "visible" bounds marks around Illustrator PageItems. A PageItem's visible bounds are determined using the GetVisibleBounds utility function.

// usage example
var doc = app.activeDocument;
var sel = doc.selection;

var boundMarkLength = 12; // points
var boundMarkStrokeWeight = 1.5; // points

var customBoundMarkColor = new RGBColor();
customBoundMarkColor.red = 0;
customBoundMarkColor.green = 0;
customBoundMarkColor.blue = 255;

drawVisibleBounds(sel, boundMarkLength, boundMarkStrokeWeight, customBoundMarkColor);

GetObjectPlacementInfo

Download

Provide the bounds of a PageItem and get all of its placement information. Includes left, top, right, bottom, width, height, centerX, and centerY.

var myObject = app.activeDocument.pageItems[0]
var myObjectPlacementInfo = getObjectPlacementInfo(myObject.visibleBounds)

GetVisibleBounds

Download

Determine the actual "visible" bounds for an object accounting for clipping mask and compound paths.

var clippedObject = app.activeDocument.pageItems[0]
var bounds = getVisibleBounds(clippedObject)

GroupObjectsByRow

Download

Take an array of Adobe Illustrator pageItems and group them by vertical separation.

Note

This script was designed to group text characters but works just fine for most types of pageItems.

Logger

Download

Module for easy file logging from within Adobe ExtendScript.

Features:

  • timestamps
  • "append" or "write" modes
  • file size rotation
  • optional forwarding of any writes to the console via $.writeln()
  • multiple argument concatenation logger.log("arg1", "arg2", "arg3")
var logFile = Folder.userData + "example.log";
logger = new Logger(logFilePath);
logger.log("hello, world!");

ReleaseAllContainers

Download

Clean-up junky files by releasing all selected containers (groups, compound paths, and clipping masks).

Note

This script isn't rocket science, it just recursively runs Ungroup, Clipping Mask Release, and Compound Path Release until no more container objects exist. I found this method works no matter how nested the container objects are and performs far better for weird edge cases than trying to remove each element from withing each container via the API.

ReleaseGroup

Download

Release objects from within a group container similar to Object > Ungroup but can also works recursively.

About

Scripts for Adobe Illustrator

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •