Chuyển đến nội dung
Skillpedia
Lập trình chung40k · #7040

adobe-illustrator-scripting

Skill này làm gì

Công cụ này giúp tạo và sửa mã (script) để tự động hóa tác vụ trong Adobe Illustrator. Nó dùng ngôn ngữ ExtendScript (tương tự JavaScript) để Illustrator tự tạo hoặc chỉnh sửa thiết kế, lớp và chữ.

Khi nào nên dùng

  • ✓Khi bạn muốn Illustrator tự tạo hoặc thay đổi thiết kế.
  • ✓Khi một script tự động hóa Illustrator không chạy và bạn cần sửa.
  • ✓Khi bạn muốn Illustrator xuất nhiều thiết kế sang các định dạng khác nhau cùng lúc.

Liên kết skill

https://github.com/github/awesome-copilot/blob/main/skills/adobe-illustrator-scripting/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/github/awesome-copilot/blob/main/skills/adobe-illustrator-scripting/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một script đổi màu tất cả đối tượng màu xanh thành đỏ trong tài liệu hiện tại của tôi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn viết mã ExtendScript để báo cho Illustrator biết chính xác phải làm gì, từng bước một. AI có thể giúp bạn viết mã này hoặc tìm lỗi trong mã bạn đã có.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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 (.jsx or .js files)
  • 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 .jsx files

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 .jsx file
  • Startup Scripts: Place scripts in the Startup Scripts folder to run automatically on launch
  • Target directive: Begin scripts with #target illustrator when running from ESTK or external tools
  • #targetengine directive: 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), or BridgeTalk messages from other Adobe apps. See External Invocation & Argument Passing.

Naming Conventions (JavaScript)

  • Objects and properties use camelCase: activeDocument, pathItems, textFrames
  • The app global references the Application object
  • Collection indices are zero-based: documents[0] is the frontmost document
  • Use typename property 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.

…

Câu hỏi thường gặp

Tôi có cần là lập trình viên giỏi để dùng công cụ này không?

Có kiến thức JavaScript cơ bản sẽ hữu ích, nhưng AI vẫn có thể hỗ trợ ngay cả khi bạn biết ít, bằng cách giải thích lệnh và logic.

“ExtendScript” là gì?

Đó là ngôn ngữ lập trình dựa trên JavaScript mà Adobe dùng để tự động hóa phần mềm của mình, như Illustrator.

Tôi có thể dùng công cụ này để tự động hóa mọi việc trong Illustrator không?

Có, miễn là tác vụ có thể được mô tả thành các bước logic mà Illustrator hiểu. Công cụ bao quát phần lớn các chức năng của chương trình.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
40k
Vị trí xếp hạng
#7040
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự