illustrator 编程
    ## Illustrator Scripting.
    Illustrator scripting allows you to automate tasks and extend the functionality of the application. You can use scripts to create new objects, modify existing objects, and perform a wide variety of other tasks.
    Scripts can be written in JavaScript, AppleScript, or VBScript. JavaScript is the most popular scripting language for Illustrator, and it is the language that we will use in this tutorial.
    To create a new script, open the Illustrator Script Editor (File > Scripts > Script Editor). The Script Editor is a simple text editor that you can use to write and edit scripts.
    Once you have created a new script, you can start writing your code. The following code will create a new rectangle on the artboard:
    js.
    var rect = new Rectangle();
    rect.width = 100;
    rect.height = 100;
    rect.fillColor = new RGBColor();
    d = 1;
    = 0;
    rect.fillColor.blue = 0;
    activeDocument.add(rect);
    To run a script, click the Run button in the Script Editor. The script will be executed, and the new rectangle will be created on the artboard.
    Scripts can be used to automate a wide variety of tasks in Illustrator. For example, you c
editorjsan use scripts to:
    Create new objects.
    Modify existing objects.
    Perform complex calculations.
    Generate reports.
    Extend the functionality of Illustrator.
    If you are new to scripting, I recommend that you start by reading the Adobe Illustrator Scripting Guide. This guide provides a comprehensive overview of Illustrator scripting, and it includes many examples of how to use scripts to automate tasks.