Automation with scripts

When you run a script, your computer performs a sequence of operations. These operations may involve only Illustrator, or they may involve other applications, such as word-processing, spreadsheet, and database-management programs.

Illustrator supports multiple scripting environments (including Microsoft Visual Basic, AppleScript, JavaScript, and ExtendScript). You can use the standard scripts that come with Illustrator, and you can create your own scripts and add them to the Scripts submenu.

For more information about scripting in Illustrator, see the latest documentation at www.adobe.com/devnet/illustrator/scripting.html. Sample scripts are installed in the Adobe Illustrator <version number>/Scripting folder.

Run a script

  1. Choose File > Scripts, and choose a script. Alternatively, choose File > Scripts > Other Script, and navigate to a script.

  2. To execute a script, drag and drop a .jsx file onto Illustrator. However, this is not a recommended and secure way and a warning dialog is presented to alert you to prevent any accidental actions. If you still intend to execute scripts by the drag and drop action, then please follow the below steps to suppress the warning dialog:

    1. Create a JSX file with the following content: app.preferences.setBooleanPreference("ShowExternalJSXWarning", false);
    2. Save the above JSX file. Now, go to File > Scripts > Other Script, and choose the newly saved jsx file.

    This will suppress the warning dialog and run the script.

Note:

If you edit a script while Illustrator is running, you must save your changes for them to take effect.

Install a script

  1. Copy the script to your computer’s hard disk.

    If you place the script in the Adobe Illustrator Scripts folder, the script will appear in the File > Scripts submenu.

    If you place the script in another location on the hard disk, you can run the script in Illustrator by choosing File > Scripts > Other Script.

    Note:

    If you place a script in the Adobe Illustrator Scripts folder while Illustrator is running, you must restart Illustrator for the script to appear in the Scripts submenu.

Adobe logo

Sign in to your account