adobe-illustrator-scripting
它能做什么
这个工具可以帮你编写和修复脚本,用来自动化 Adobe Illustrator 中的操作。它使用一种名为 ExtendScript 的语言(与 JavaScript 类似),让 Illustrator 自动完成创建或修改设计、图层和文字等任务。
适用场景
- ✓当你希望 Illustrator 自动创建或修改设计时。
- ✓当 Illustrator 的自动化脚本无法运行,需要修复时。
- ✓当你想让 Illustrator 一次性把大量设计导出为不同格式时。
技能链接
https://github.com/github/awesome-copilot/blob/main/skills/adobe-illustrator-scripting/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“帮我写一个脚本,把当前文档中所有蓝色对象的颜色改成红色。”
每周 5 个新技能,1 分钟读完。
工作原理
你需要用 ExtendScript 编写代码,逐步告诉 Illustrator 具体要做什么。AI 可以帮你编写这段代码,也可以帮你找出已有代码中的错误。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Adobe Illustrator Scripting
Expert guidance for automating Adobe Illustrator through ExtendScript (JavaScript/JSX). This skill covers the Illustrator scripting object model, all major API objects, code patterns, and best practices for writing production-quality .jsx scripts.
Bundled Assets
references/object-model-quick-reference.md: Use this as a quick lookup for the Illustrator scripting object model, common document and page item types, and related DOM concepts while writing or debugging scripts.scripts/: Contains example Illustrator automation scripts you can use as starting points or implementation patterns for common tasks such as document manipulation, exports, batch processing, and DOM usage. Review and adapt these examples when you need working JSX patterns or want to compare behavior while debugging.
When to Use This Skill
- Writing new Illustrator automation scripts (
.jsxor.jsfiles) - Debugging or fixing existing Illustrator ExtendScript code
- Manipulating documents, layers, page items, paths, text, or colors programmatically
- Batch-processing Illustrator files or generating artwork from data
- Exporting documents to various formats (PDF, SVG, PNG, EPS, etc.)
- Working with the Illustrator DOM (Application, Document, Layer, PathItem, TextFrame, etc.)
- Creating data-driven graphics using variables and datasets
- Automating print workflows with scripted print options
Prerequisites
- Adobe Illustrator CC or later installed
- Basic JavaScript knowledge (ExtendScript is ES3-based with Adobe extensions)
- Scripts are executed via File > Scripts > Other Scripts, the Scripts menu, or placed in the Startup Scripts folder
- The ExtendScript Toolkit (ESTK) or any text editor can be used to write
.jsxfiles
Scripting Environment
Language and File Extensions
| Language | Extension | Platform |
|---|---|---|
| ExtendScript/JavaScript | .jsx, .js |
Windows, macOS |
| AppleScript | .scpt |
macOS only |
| VBScript | .vbs |
Windows only |
This skill focuses on ExtendScript/JavaScript as the cross-platform, most widely used option.
Executing Scripts
- Scripts menu: File > Scripts lists scripts from the application scripts folder
- Other Scripts: File > Scripts > Other Scripts to browse and run any
.jsxfile - Startup Scripts: Place scripts in the Startup Scripts folder to run automatically on launch
- Target directive: Begin scripts with
#target illustratorwhen running from ESTK or external tools #targetenginedirective: Use#targetengine "session"to persist variables across script executions- External invocation: Scripts are frequently launched from outside Illustrator — by shell scripts, task runners, CI jobs, ExtendScript Toolkit (
ExtendScript Toolkit.exe -run script.jsx), orBridgeTalkmessages from other Adobe apps. See External Invocation & Argument Passing.
Naming Conventions (JavaScript)
- Objects and properties use camelCase:
activeDocument,pathItems,textFrames - The
appglobal references theApplicationobject - Collection indices are zero-based:
documents[0]is the frontmost document - Use
typenameproperty to identify object types at runtime
Object Model Overview
The Illustrator DOM follows a strict containment hierarchy:
Application (app)
├── activeDocument / documents[]
│ ├── layers[]
│ │ ├── pageItems[] (all artwork)
│ │ ├── pathItems[]
│ │ ├── compoundPathItems[]
│ │ ├── textFrames[]
│ │ ├── placedItems[]
│ │ ├── rasterItems[]
│ │ ├── meshItems[]
│ │ ├── pluginItems[]
│ │ ├── graphItems[]
│ │ ├── symbolItems[]
│ │ ├── nonNativeItems[]
│ │ ├── legacyTextItems[]
│ │ └── groupItems[]
│ ├── artboards[]
│ ├── views[]
│ ├── selection (array of selected items)
│ ├── swatches[], spots[], gradients[], patterns[]
│ ├── graphicStyles[], brushes[], symbols[]
│ ├── textFonts[] (via app.textFonts)
│ ├── stories[], characterStyles[], paragraphStyles[]
│ ├── variables[], datasets[]
│ └── inkList[], printOptions
├── preferences
├── printerList[]
└── textFonts[]
Top-Level Objects
- Application (
app): The root object. Provides access to documents, preferences, fonts, and printers. Key properties:activeDocument,documents,textFonts,printerList,userInteractionLevel,version.
…
常见问题
我需要是专业的程序员才能使用吗?
有一些基础的 JavaScript 知识会有帮助,但即使你懂得很少,AI 也能通过解释命令和逻辑来提供帮助。
什么是 'ExtendScript'?
它是一种基于 JavaScript 的编程语言,Adobe 用它来实现旗下软件(比如 Illustrator)的自动化。
我能用它实现 Illustrator 中的任何自动化吗?
只要任务能被描述成 Illustrator 能理解的逻辑步骤,就可以。它覆盖了该软件的大部分功能。
详情
作者的原始描述
Write, debug, and optimize Adobe Illustrator automation scripts using ExtendScript (JavaScript/JSX). Use when creating or modifying scripts that manipulate documents, layers, paths, text frames, colors, symbols, artboards, or any Illustrator DOM objects. Covers the complete JavaScript object model, coordinate system, measurement units, export workflows, and scripting best practices.
repo: github/awesome-copilot
热度
- GitHub 星标
- 40k
- 排名
- #7040
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
acquire-codebase-knowledge
40k帮你的智能体理解并编写现有代码项目的文档。它有助于新成员快速上手,或者快速了解项目架构。
acreadiness-assess
40k让你的智能体评估一个项目对 AI 的准备程度,并生成报告。它有助于了解项目在使用 AI 工具方面的准备情况。
acreadiness-generate-instructions
40k帮你的智能体根据评估结果编写 AI 工具的指令文件。它有助于改善 AI 与代码的交互方式,并弥补已发现的不足。
acreadiness-policy
40k让你的智能体协助制定或应用 AI 项目评估的政策。它有助于规范项目的评估方式,并确保合规。