Collection of helpful functions for scripting in Illustrator.
Simple helpers to use Adobe's BridgeTalk class.
Setups BridgeTalk Message and define a global function 'BridgeTalkOnResult()'.
Send Bridge Talk Message.
Parameters
Color class.
Converts generic object (with red, green, blue properties) to Adobe's RGBColor object.
Parameters
colorObject
object
Returns RGBColor RGBColor
Converts generic object (with cyan, magenta, yellow, key, properties) to Adobe's CMYKColor object.
Parameters
colorObject
object
Returns CMYKColor CMYKColor
Get all colors from a specific SwatchGroup / Palette
Parameters
paletteName
string
Returns Array<Color> Array of Color
Data class. TODO.
Prompts message for folder selection.
Parameters
promptMessage
string
Returns string
Reads file and returns JSON object.
Parameters
Returns JSON
File to JSON object.
Parameters
fileObject
File
Returns JSON
Saves, and overwrites, text file.
Parameters
Documents class.
Get Active Document
Returns Document
Export class. TODO.
Saves active document as Ai.
Parameters
GUI class.
Delete previous window session.
Parameters
title
string Window title.
The main class/object, for a 'namespace-like' structure in Javascript.
Layers class.
Searches layers by name.
Parameters
layersArray
Array<Layer> Array of Layer.namesArray
Array<string> Array of strings.maxDepthLevel
number How many sub-layers.returnOnlyFirst
boolean One or all occurances.
Returns Array<Layer> Array of Layer objects.
Deletes layers by name.
Parameters
layersArray
Array<Layer> Array of Layer.namesArray
Array<string> Array of strings.maxDepthLevel
number How many sub-layers.removeOnlyFirst
boolean One or all occurances.
Logger class, to use as in GUI console.
Appends message to 'log' variable.
Parameters
Clears 'log' variable.
Object to 'log' string.
Returns string
Data class.
Returns the index of the specified occurance.
Parameters
Returns number If -1, occurance not found.
Converts millimeter to point.
Parameters
mm
number in millimeters.
Returns number
Converts point to millimeter.
Parameters
point
number in points.
Returns number
Maps value given in/out limits.
Parameters
Returns number
Data class.
Returns user settings from ~/Library/Application Support/HUBRIS.
Parameters
settingsFile
string
Returns string JSON object.
Saves user settings to ~/Library/Application Support/HUBRIS.
Parameters
Documentation created with documentationjs