Code Monkey home page Code Monkey logo

illustrator-scripts's Introduction

Logo

Adobe Illustrator Scripts

Downloads Telegram Yotube

Instructions in other languages: English, Русский

Hi

This is a collection of JS scripts for Adobe Illustrator. All scripts created by me, sometimes using parts of other authors’ code. The Github Gist contains the small scripts that are not included in the main collection.

The descriptions for each file can be found in the file’s header text. Test environment: Illustrator CS6, CC 2019-2024 (Windows), CC 2019-2024 (Mac OS).

How to download one script

  1. In the script description, click Direct button.
  2. The tab will open the script code.
  3. Press Cmd/Ctrl + S for download.

How to run scripts

Variant 1 — Install

  1. Download archive and unzip. All scripts are in the folder jsx
  2. Place <script_name>.jsx in the Illustrator Scripts folder:
    • OS X: /Applications/Adobe Illustrator [vers.]/Presets.localized/en_GB/Scripts
    • Windows (32 bit): C:\Program Files (x86)\Adobe\Adobe Illustrator [vers.]\Presets\en_GB\Scripts\
    • Windows (64 bit): C:\Program Files\Adobe\Adobe Illustrator [vers.] (64 Bit)\Presets\en_GB\Scripts\
    • RU lang: C:\Program Files\Adobe\Adobe Illustrator [версия]\Стили\ru_RU\Сценарии\
  3. Restart Illustrator
  4. Scripts will be available in File → Scripts.

Variant 2 — Drag & Drop

Drag and drop the script file (JS or JSX) onto the tabs of Illustrator documents. If you drag it to the area of the open document, the script may not work correctly (Adobe bug).

Drag-n-drop to AI

Variant 3 — Use extensions

I recommend the Scripshon Trees or LAScripts panel. In it you can specify which folder your script files are stored in.

Variant 4 — Utilities

You can use them to create macros to run scripts with hotkeys.

  1. SPAi (Mac OS, free)
  2. Hammerspoon (Mac OS, free)
  3. Keyboard Maestro (Mac OS, paid)
  4. BetterTouchTool (Mac OS, paid)
  5. AutoHotkey (Windows, free)

Warning

To run scripts via the F1-F15 hotkeys, users add them to the Actions panel. If another action is running inside the script, Illustrator will freeze. How do you check it? Open the script in a text editor, if you find app.doScript() in the code, it is using an action. This is in all versions from CS6 to CC 2023 on Mac and Windows.

Donate

Many scripts are free to download thanks to user support. Help me to develop new scripts and update existing ones by supporting my work with any amount via Buymeacoffee USD, ЮMoney RUB, Tinkoff RUB, Donatty RUB, DonatePay RUB. Thank you.

Paid scripts

  • ExportSequence — script for toggle visibility of numbered objects in selected groups and exports document as sequence to PNGs or JPGs.
  • ColorToner — script for generating tints, shades, and tones from base colors.
  • GradientBlender — script to make gradients more accurate, smooth.
  • Ai2Ae — script for prepare Adobe Illustrator Layers for import into Adobe After Effects.
  • ArtboardsFromCSV — script for batch creation of artboards with names and dimensions defined in a CSV table.
  • Duplicate Artboards Pro — script for copying the selected Artboard with or without his Artwork.
  • HighlightText — script for adding highlighting strokes based on text lines.
  • ImportImagesByName — script for imports images from the specified folder by names from the contents of the selected text objects.

Categories

Click the category name to learn more about the scripts in the selected category.

Download

Testimonials

  • I am very thankful for such a nice and useful scripts. It makes my life easy and more productive - Rizwan Abuzar
  • You are a hero. Thank you for all your hard work improving illustrator so it saves countless hours for people worldwide via your scripts - Nitcho
  • Sergey, these scripts of yours are great — Terry Foxx
  • Wow. I just installed and successfully tested. Outstanding work!!! — Zak Lay
  • Tried your script to export selected objects to separate Ai, works smartly — Dmitry
  • I looked at your post. Useful scripts! — Askhat Gilyakhov
  • Thank you for such wonderful scripts — Oleg Zybailov
  • Very powerful and user-friendly, cover a lot of gaps — Egor Chistyakov
  • I'm a big fan of your scripts. Absolutely amazing work — David Nightingale
  • You are the best ever script editor. All scripts are amazing and useful for designers and time saver. Thank you for your supporting — Tuan Hijas Musaffer

Don't forget sharing link with a friend 🙂

Contribute

Found a bug? Please submit a new issues on GitHub.

Blog

Tips, tricks and scripts bugs for Adobe Illustrator: English, Русский.

Contact

Email [email protected]
Telegram @sergosokin

License

All scripts is licensed under the MIT licence.
See the included LICENSE file for more details.

illustrator-scripts's People

Contributors

creold avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

illustrator-scripts's Issues

Running SplitPath from an Action causes the script to not work correctly.

If you attempt to run the SplitPath.jsx script from an Action (through the simple "Insert Menu Item..." option), the SplitPath UI will appear as normal, but when the OK button is pressed, the expected splitting of the paths doesn't happen, and instead the paths and shape are only grouped into a Live Paint group.

BatchTrace Options

I would like to ask if you know if there is a way to export the traced results back to the original file ?
for example if the input file was a .psd file make illustrator trace and save the results back to the .psd file. as bitmap not vector.

Is there a way to do this?

SelectPointsType

Select Points Type is not Working ??
Adobe: CC 2020 , OS: windows 10 2004

Thanks

[BatchRenamer] Renamer won't recognize text object default names

Script doesn't recognize default names of text objects

Description:

When renaming a text object, its name is automatically inserted into the script. However, if the object's name is left as the default (i.e., it matches the text content of the object), the script ends up with an empty space, even when using the {N} placeholder.

Steps to reproduce:

  1. Create a new text object with the default name (which matches its content).
  2. Use the script to process the object.
  3. Observe that where the object's name should appear, there is an empty space, even if {N} is used.

Expected behavior:
The script should be able to recognize and insert the default names of text objects

Actual behavior:
The script leaves an empty space in place of the object's name if the name is the default.

image image

TrimMask hangs my Mac when launched by action

Hi! I have created an action in Illustrator to launch your TrimMask.jsx script and it crashes my Mac but if I launch it normally (from Illustrator menu) it works. May be there is a bug? Best regards, Yuri

FitSelectionToArtboards-Lite and FitSelectionToArtboards are not working anymore after resetting my Illustrator Preferences.

I can't tell if it's the fact that I reset my preferences, or if a new update to Illustrator caused these scripts to break.

FitSelectionToArtboards-Lite is correctly resizing the selected item, but incorrectly placing it directly above the artboard instead of centered in the middle.

See this video:

Illustrator_50Vkk0OpXV.mp4

(Also uploaded here because GitHub seems to be misbehaving: https://streamable.com/8nmpsn)

I think the fitToArtboard function is working as expected, but the centerToArtboard function is broken.

It also no longer handles multiple selections. I'm pretty sure that previously I could select multiple items, run the script, and all of my selections would be fit to multiple empty artboards. Similar to the FitSelectionToArtboards script but with no dialog.

Setting that aside, the FitSelectionToArtboards is also misbehaving in the same way. It correctly resizes the artwork but again places each object directly above the artboard instead of centered in the middle.

See this video:

Illustrator_uuTGZXz1mU.mp4

(Also uploaded here because GitHub seems to be misbehaving: https://streamable.com/qgx6h8)

I am terrible with extendscript, but I managed to get FitSelectionToArtboards-Lite to work by modifying line 283 from:

centerY = top + (itemSize.h + (isFlipY ? -1 : 1) * abHeight) / 2;

To:

centerY = (top + (itemSize.h + (isFlipY ? -1 : 1) * abHeight) / 2) - itemSize.h;

And the same modification to FitSelectionToArtboards also seemeed the fix the problem.

However, I'm positive this isn't the correct approach, but just a hack. I'm hoping you can find some time to update the scripts and are able to reproduce the issue.

Maybe there is an important setting that was reverted when I reset my preferences that broke the script?

Anyway, thanks for all your hard work on these scripts. Hoping there is a solution.

Jay

Request: Add artboard's name to canvas

Is there a script for Illustrator that lets you place the artboard name on the artboard itself?
I.e. the artboard is named "Figure 1", so this should be put as text on the top left corner.

Can you PLEASE create a script for:

Copy/Pasting a single layer into many layer groups? 😭

Example: (click to enlarge image)

animated gif of my adobe illustrator script suggestion

To begin with I'm having trouble exporting PNG files from artboards that have many layers each

example of my artboards #=layer amount
92 56 283
64 24 5
310 12 65

The Artboards all have the same canvas size, but the layers are part of a collective.
Some shapes inside the layer-groups are 50x50px, others 350x80px.
I need the exported PNG to have the full transparent canvas size.

As you can see in the video; When I "Generate Asset" before my bad solution, only the shape itself gets exported.

My "hack" (read: hillbilly-solution) is to place a rectangle the size of the artboard on top of the layer with the opacity reduced to 0%.
This works, but the high numbers in the table above are non-fictional (and lacking many artboards)

After 2 days of searching, this appears to not be natively possible in Illustrator, so a script is needed.

Thank you for the scripts you shared already. I've been using about a handful quite often

Please help me. I don't want to copy/paste manually over 2500 times.

TrimMasks.jsx explodes compound paths

Really great script, have used many times. My issue: TrimMasks unfortunately removes most existing compound paths / groups.

(Sorry for Dutch interface in screenshots)

If this is unsolvable, a script that can group (or compound) items based on color would help. The workflow would then become: 1) select all countries 2) give each country a unique color 3) run TrimMask 4) Run script GroupbyColor or CompoundByColor.

Keep up the great scripts!!

image
image

download

unable to download the scripts

A bug was found in SelectBySwatches.jsx

A bug was found in SelectBySwatches.jsx. If the top-level layer of Illustrator is locked or hidden, running SelectBySwatches.jsx will cause Illustrator software to be unable to perform other operations and can only close Illustrator

Batch Tracing from Folder ignores preset

First and foremost, I would like to thank you for your great work.

I have just spent hours trying to achieve batch processing with image tracing using Adobe tools, where I can choose my own preset, but to no avail. I also explored scripting, which was able to load my preset, but the number of colors was always set to 100, even though it is defined differently in the preset. In the end, I tried to define the parameters in the script itself, but I lost patience because the settings offer different possibilities and options than the sliders in Illustrator itself.

I was just about to go to bed when I found your scripts, which are brilliant. Unfortunately, there is a problem with batch processing from a folder where the selected tracing preset is being ignored. Everything works correctly with open files. I was also a bit confused because the script can only be opened when a file is open; otherwise, it does not respond.

Perhaps you have a solution to this problem or an idea of how to fix it?

Kind Regards

Artboards Finder v0.1.4 not zooming

Hello Sergey,
Trying out the artboard finder script in illustrator 2023 (27.0.1), the script runs and is able to identify the artboard, change the number in the "artboard navigation" but does not actually zoom over to the artboard. I've tried changing the zoom ratio and that doesn't seem to do anything.

thank you for all of your work on these scripts!

Any chance of a Zoom and center sister script that only zooms and centers to the active artboard?

Illustrator has Fit artboard in window in the view menu, but it completely fills the screen at 100%. I really like how your Zoom and Center script has a ratio to reduce the zoom to a more sane size. But it only operates on everything visible. So if I have a lot of artwork (like a big icon grid), it just zooms to fit all the icons.

You would be my hero if you could put together a script that does the same as Zoom and Center, but for the active artboard.

And even more, if you're feeling ambitious, another that does the same for the current selection.

Really appreciate the consideration, and love your scripts.

Thanks,
Jay

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.