<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by AiScripts on Medium]]></title>
        <description><![CDATA[Stories by AiScripts on Medium]]></description>
        <link>https://medium.com/@aiscripts?source=rss-6daeeede47cb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nDpnTuxikJ0K2k_IA_cELg@2x.jpeg</url>
            <title>Stories by AiScripts on Medium</title>
            <link>https://medium.com/@aiscripts?source=rss-6daeeede47cb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 21:08:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aiscripts/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Move an Object Together with Its Opacity Mask]]></title>
            <link>https://aiscripts.medium.com/how-to-move-an-object-together-with-its-opacity-mask-1db621a3444e?source=rss-6daeeede47cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/1db621a3444e</guid>
            <category><![CDATA[graphic-design]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[adobe-illustrator]]></category>
            <dc:creator><![CDATA[AiScripts]]></dc:creator>
            <pubDate>Sun, 25 Oct 2026 13:05:46 GMT</pubDate>
            <atom:updated>2026-10-25T13:06:51.916Z</atom:updated>
            <content:encoded><![CDATA[<p>If you need to move, rotate, or scale an object programmatically, ExtendScript offers standard methods like translate(), resize(), or rotate().</p><p>These methods work on most objects in your document — except for objects with an <strong>Opacity Mask</strong> applied from the Transparency panel. When you run a script to transform the object, the mask stays right where it was, even if the link icon between the object and the mask is checked in the Transparency panel.</p><p>That’s because the mask isn’t stored on the document layers visible to you and your scripts. Instead, it gets tucked away into an invisible technical container layer named &lt;Opacity Mask&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*axeRwlAhEigfOG55tfn4GQ@2x.gif" /><figcaption>The selected object moves, but the script leaves the mask behind</figcaption></figure><h4>What Works Natively</h4><p>You can actually generate temporary Actions in Illustrator right from a script. For instance, you could calculate the X and Y offsets, then generate an action with a built-in Move command using those exact values. It’s a working approach, but writing the code for it is a headache.</p><p>Another option is to use Illustrator’s built-in menu commands under <strong>Object → Align</strong>, which move both objects and their masks together. You can trigger these commands via the scripting method app.executeMenuCommand():</p><pre>app.executeMenuCommand(&#39;Horizontal Align Left&#39;);<br>app.executeMenuCommand(&#39;Horizontal Align Center&#39;);<br>app.executeMenuCommand(&#39;Horizontal Align Right&#39;);<br>app.executeMenuCommand(&#39;Vertical Align Top&#39;);<br>app.executeMenuCommand(&#39;Vertical Align Center&#39;);<br>app.executeMenuCommand(&#39;Vertical Align Bottom&#39;);</pre><p>The catch? These alignment commands snap objects relative to each other or to the artboard — not by an arbitrary distance of your choosing. To get around this, we need a temporary key object positioned at the exact target coordinates so we can align our main object to it.</p><p>We actually brainstormed this trick a while back with <a href="https://www.linkedin.com/in/egor-chistyakov-29926297/">Egor Chistyakov</a>, an Adobe Illustrator Prerelease program ambassador.</p><h4>How the Trick Works</h4><ol><li>Select the object.</li><li>Create a temporary artboard right at the spot where you want the object to go.</li><li>Switch the alignment mode to <strong>Align to Artboard</strong>.</li><li>Run the desired alignment command (for example, snap to the left edge of the artboard).</li><li>Delete the temporary artboard.</li></ol><p>Up until recently, users had to switch alignment modes manually <em>before</em> running the script. But starting with <strong>Illustrator 2026 v30.6</strong>, you can now toggle these modes directly from your code:</p><pre>app.executeMenuCommand(&#39;Align To Artboard&#39;);<br>app.executeMenuCommand(&#39;Align To Selection&#39;);<br>app.executeMenuCommand(&#39;Align To Key Object&#39;);</pre><h4>Code Example</h4><pre>(function () {<br>  if (parseFloat(app.version) &gt;= 30.6) {<br>    moveViaArtboard(app.selection[0], 50, -20);<br>  }<br><br>  function moveViaArtboard(item, dx, dy) {<br>    var doc = app.activeDocument;<br>    var prevIndex = doc.artboards.getActiveArtboardIndex();<br>    var b = item.geometricBounds; // [left, top, right, bottom]<br><br>    // Temporary artboard: same dimensions as the object, but placed at the target coordinates<br>    var tempArtboard = doc.artboards.add([b[0] + dx, b[1] + dy, b[2] + dx, b[3] + dy]);<br>    var tempIndex = doc.artboards.length - 1;<br>    doc.artboards.setActiveArtboardIndex(tempIndex);<br><br>    doc.selection = [item];<br>    try {<br>      app.executeMenuCommand(&#39;Align To Artboard&#39;);<br>      app.executeMenuCommand(&#39;Horizontal Align Left&#39;);<br>      app.executeMenuCommand(&#39;Vertical Align Top&#39;);<br>    } finally {<br>      tempArtboard.remove();<br>      doc.artboards.setActiveArtboardIndex(prevIndex);<br>    }<br>  }<br>})();</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*9pMpL9bpZ4Xz71_y_GYcjw@2x.gif" /><figcaption>The temporary artboard flashes on screen, doing its job almost invisibly to the user</figcaption></figure><p>A quick heads-up: Align commands rely on the <strong>Use Preview Bounds</strong> setting in Illustrator (which determines whether alignment accounts for stroke weights or just geometric boundaries). Also, Illustrator has a hard limit of <strong>1000 artboards</strong> per document (introduced back in CC 2018). If your document is already maxed out, the script won’t be able to create a temporary artboard.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1db621a3444e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adobe Illustrator Automation: Actions, Scripts, Extensions, and Plugins Explained]]></title>
            <link>https://aiscripts.medium.com/adobe-illustrator-automation-actions-scripts-extensions-and-plugins-explained-95624ef48642?source=rss-6daeeede47cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/95624ef48642</guid>
            <category><![CDATA[adobe-illustrator]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[graphic-design]]></category>
            <dc:creator><![CDATA[AiScripts]]></dc:creator>
            <pubDate>Mon, 10 Aug 2026 15:38:58 GMT</pubDate>
            <atom:updated>2026-10-21T05:21:04.311Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A practical guide for designers on how to stop repeating manual tasks and choose the right automation tool.</em></p><p>Repetitive tasks in Adobe Illustrator can be automated in several ways. Depending on what you’re trying to achieve, the solution might be simple and require zero coding or AI tools. In other cases, it might demand deep technical knowledge and days of development, even with AI coding assistants.</p><p>Let’s break down the main automation options so you know exactly what tool to look for — and stop getting confused by the terms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xo5JNhu_9sHYtfoT.jpg" /></figure><h3>1. Actions</h3><p>Actions are recorded sequences of manual steps inside Illustrator.</p><p>In the <strong>Actions</strong> panel, you hit record and manually perform a series of steps on an object — for instance, <em>Rotate 45° → Scale down to 50% → Fill with red</em>. Once recorded, you can replay that exact sequence on any object with a single click or a keyboard shortcut.</p><h4>When to use</h4><p>When you need to quickly repeat a strict, fixed sequence of basic Illustrator operations.</p><h4>Pros</h4><ul><li><strong>No coding required</strong> (though you can embed ready-made JavaScript/ExtendScript scripts inside an Action if needed).</li><li><strong>Easy to create</strong> directly inside Illustrator’s interface.</li></ul><h4>Cons</h4><ul><li><strong>No complex logic.</strong> An Action can’t make decisions — it won’t find a layer named “X” and apply “Y” to it. It simply replays recorded steps blindly.</li><li><strong>Incomplete coverage.</strong> Not all manual actions, menu commands, or panel interactions can be recorded into an Action.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aBGPbrx_vcxT-wuh.jpg" /></figure><h3>2. Scripts</h3><p>Scripts are small programs (saved as .js, .jsx, or .jsxbin files) written in ExtendScript—Adobe&#39;s version of JavaScript. They step in where Actions fall short. Creating scripts requires some programming skills or help from AI tools.</p><h4>When to use</h4><p>Batch file processing, modifying specific object properties, smart sorting, generating layouts from spreadsheets, or managing layer names and folder structures.</p><h4>Pros</h4><ul><li><strong>Supports complex logic.</strong> For example: <em>“Check all artboards; if an artboard name contains ‘@2x’, export it as a double-resolution PNG.”</em></li><li><strong>Works with external files.</strong> Scripts can process entire folders of files or read data from .txt and .csv spreadsheets.</li><li><strong>Cross-platform and stable.</strong> They work on both macOS and Windows and rarely break when Illustrator updates.</li><li><strong>Custom UI.</strong> You can add dialog boxes and input forms so users can adjust settings before running the script.</li><li><strong>Fully offline.</strong> No internet connection needed.</li></ul><h4>Cons</h4><ul><li><strong>Potential host bugs.</strong> New updates to Illustrator can occasionally break script behaviors. Fixes from Adobe might take a release — or a few years.</li><li><strong>Limited object access.</strong> Scripts cannot control everything in Illustrator (for example, Opacity Mask operations are mostly out of reach).</li><li><strong>Modal execution.</strong> Scripts lock the interface while running — you can’t continue working in Illustrator until the script finishes its task.</li><li><strong>Performance drops on heavy tasks.</strong> Scripts can run slow when processing thousands of objects or running heavy mathematical calculations.</li><li><strong>Basic interface styling.</strong> Script UI elements are minimal and offer very limited visual customization.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XjD5kFUH0pN72o8Y.jpg" /></figure><h3>3. CEP Extensions (Panels)</h3><p>CEP Extensions are hybrid panels built using standard web technologies (HTML, CSS, JavaScript) running on an embedded Chromium browser engine. They provide interactive UI elements (buttons, sliders, input fields) and send background commands to Illustrator via scripts.</p><blockquote><em>Note: </em>Adobe is gradually rolling out the new UXP platform in Photoshop and InDesign. They’re planning to <a href="https://blog.developer.adobe.com/en/publish/2026/09/investing-in-the-future-of-creative-cloud-extensibility-uxp-comes-to-our-flagship-applications">test UXP in Illustrator by spring 2027</a>, and CEP is set to be disabled by December 2028.</blockquote><h4>When to use</h4><p>When you need a persistent, floating panel on your workspace (like an asset library or a pattern generator), or when your workflow requires fast math computations before vector objects are created.</p><h4>Pros</h4><ul><li><strong>Persistent UI.</strong> Extension panels sit right alongside native Illustrator panels while you work, without locking the interface.</li><li><strong>Faster heavy math.</strong> Because extensions run on a modern Chromium browser engine, complex geometric or mathematical calculations can run much faster on the web side before sending the finalized dataset to Illustrator.</li><li><strong>Access to JavaScript libraries.</strong> Developers can import existing JavaScript libraries (like <em>Clipper</em> for polygon offsets) instead of writing complex algorithms from scratch.</li><li><strong>Web connectivity.</strong> Extensions can fetch data from external servers, APIs, or websites via standard HTTP requests.</li></ul><h4>Cons</h4><ul><li><strong>Harder to build and install.</strong> Setup and development are significantly more complex than standard single-file scripts.</li><li><strong>Resource overhead.</strong> Every open extension panel runs its own Chromium instance, consuming additional system memory (RAM).</li><li><strong>Version sensitivity.</strong> Because web technologies evolve fast, a CEP panel written with modern libraries may not run on older Illustrator versions.</li><li><strong>Inherits script limitations.</strong> CEP panels don’t modify vector graphics directly; they pass data to Illustrator, where ExtendScript executes the final changes. This means all ExtendScript limitations still apply.</li><li><strong>Internet dependence.</strong> If the extension relies on external cloud data or server APIs, it requires an active internet connection.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LFAHP1eRnnUwwvO0.jpg" /></figure><h3>4. Plugins</h3><p>Plugins are full C++ modules compiled into .aip files that integrate natively into Illustrator&#39;s core architecture. In fact, many of Illustrator&#39;s built-in features (such as the <em>Pathfinder</em> panel) are actually internal plugins loaded from the application folder on startup. Popular third-party examples include tools by Astute Graphics (<em>Phantasm</em>, <em>VectorScribe</em>).</p><h4>When to use</h4><p>When native Illustrator capabilities aren’t enough and you need entirely new vector tools, live effects, or performance speeds that scripts and extensions simply cannot offer.</p><h4>Pros</h4><ul><li><strong>Deepest integration.</strong> Plugins can add brand-new native tools, live effects, and filters directly into Illustrator’s interface.</li><li><strong>Access to hidden object properties.</strong> Plugins can manipulate core elements that ExtendScript cannot touch (such as raster image data or gradient meshes).</li></ul><h4>Cons</h4><ul><li><strong>Most expensive and complex.</strong> Requires senior C++ software engineering skills.</li><li><strong>Version and OS lock-in.</strong> Plugins are compiled specifically for a particular operating system and Illustrator version. Major app updates can render older plugins unusable.</li><li><strong>High maintenance.</strong> If a developer stops updating a plugin, it may survive a couple of major Illustrator updates before becoming obsolete.</li><li><strong>Strict licensing.</strong> While a purchased script can easily be moved between machines, plugins often enforce strict device limits and require online activation.</li></ul><h3>Cheat Sheet: What Should You Choose?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mkm9W95slpUoYSIpuHTs7A.png" /></figure><h4>Quick Decision Guide</h4><ol><li><strong>Need to repeat 5 manual clicks quickly?</strong> → Record an <strong>Action</strong>.</li><li><strong>Need to batch-process 100 files or run conditional logic?</strong> → Find or write a <strong>Script</strong>.</li><li><strong>Need a persistent, interactive workspace panel at your fingertips?</strong> → Look for or build a <strong>CEP Extension</strong>.</li><li><strong>Lacking actual drawing tools, or hitting performance limits on complex graphics?</strong> → You need a <strong>Plugin</strong>.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95624ef48642" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ampersand Truncates ScriptUI Panel Titles]]></title>
            <link>https://aiscripts.medium.com/ampersand-breaks-scriptui-panel-title-77c9bc811e0c?source=rss-6daeeede47cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/77c9bc811e0c</guid>
            <category><![CDATA[extendscript]]></category>
            <category><![CDATA[adobe-illustrator]]></category>
            <category><![CDATA[graphic-design]]></category>
            <dc:creator><![CDATA[AiScripts]]></dc:creator>
            <pubDate>Fri, 22 May 2026 14:46:52 GMT</pubDate>
            <atom:updated>2026-05-23T05:12:45.481Z</atom:updated>
            <content:encoded><![CDATA[<p>If you need to use an ampersand (&amp;) in a script’s interface panel title (for example, “Find &amp; Replace”), you will notice that the text following the ampersand is cut off when the script runs.</p><pre>var win = new Window(&quot;dialog&quot;, &quot;Script&quot;);<br>var panel = win.add(&quot;panel&quot;, undefined, &quot;Find &amp; Replace&quot;);<br>var button = win.add(&quot;button&quot;, undefined, &quot;OK&quot;);<br>button.onClick = win.close;<br>win.show();</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*rDo5krmzZllZcrfobiYwzQ@2x.jpeg" /></figure><h3>Why This Happens</h3><p>This behavior stems from the Windows API, where an ampersand before a letter defines a keyboard shortcut (mnemonic). For instance, &amp;File is displayed as <strong>F</strong>ile, and pressing Alt+F activates that element. While this allows for assigning hotkeys in the interface, it is a Windows-only feature, as noted by Peter Kahrel in <a href="https://www.daube.ch/docu/fm-documentation/ExtendScript/ScriptUI_for_Dummies-%5BPeterKahrel%5D.pdf">ScriptUI for Dummies</a>:</p><blockquote>To select certain controls quickly or to move the cursor to a certain edit field, you can define shortcut keys for those controls. Unfortunately, this is Windows-only. Naturally, to make it clear to the user that certain shortcut keys can be used,those letters should be cued. In ScriptUI you do that by placing an &amp; before the letter that you want marked, which adds an underscore; see the screenshot.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*b79KdIyi0SVGIx58sPm9Aw@2x.jpeg" /><figcaption>Setting a keyboard shortcut with the ampersand in ScriptUI</figcaption></figure><p>Panels are not clickable controls like input fields or radio buttons, but the parser still truncates part of their title because of the ampersand. Attempting to escape the character will not resolve the issue.</p><pre>win.add(&quot;panel&quot;, undefined, &quot;Find &amp;&amp; Replace&quot;);<br>win.add(&quot;panel&quot;, undefined, &quot;Test \u0026 Run&quot;);<br>var amp = String.fromCharCode(38);<br>dialog.add(&quot;panel&quot;, undefined, &quot;Test&quot; + amp + &quot; Run&quot;);</pre><h3>Solutions</h3><p><strong>Use a Full-Width Ampersand</strong></p><p>Insert the Unicode character U+FF06. It looks almost identical to a standard ampersand, but because it has a different character code, ScriptUI does not interpret it as a shortcut marker.</p><pre>win.add(&quot;panel&quot;, undefined, &quot;Find \uFF06 Replace&quot;);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*F_TAVKbRqVEySC-4TzMQmQ@2x.jpeg" /></figure><p><strong>Replace with “and”</strong></p><p>The simplest and most reliable approach is to use the word “and” instead of the symbol.</p><pre>win.add(&quot;panel&quot;, undefined, &quot;Find and Replace&quot;);</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77c9bc811e0c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Use Symbolic Links for Illustrator Scripts]]></title>
            <link>https://aiscripts.medium.com/how-to-use-symbolic-links-for-illustrator-scripts-6d19800012c2?source=rss-6daeeede47cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d19800012c2</guid>
            <category><![CDATA[graphic-design]]></category>
            <category><![CDATA[adobe-illustrator]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[adobe]]></category>
            <dc:creator><![CDATA[AiScripts]]></dc:creator>
            <pubDate>Mon, 04 May 2026 13:26:02 GMT</pubDate>
            <atom:updated>2026-05-13T04:49:38.938Z</atom:updated>
            <content:encoded><![CDATA[<p>By default, Illustrator scans for scripts in its system folder during startup:</p><p><strong>macOS:</strong><br>/Applications/Adobe Illustrator [версия]/Presets.localized/[lang folder]/Scripts</p><p><strong>Windows:</strong><br>C:\Program Files\Adobe\Adobe Illustrator [vers.]\Presets\[lang folder]\Scripts\</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*USCJNu_2RcrfK41x.jpg" /></figure><p>This default setup has several limitations:</p><ul><li><strong>Redundancy:</strong> If you have multiple versions of Illustrator installed or migrate to a new computer, you must move your scripts manually each time.</li><li><strong>Risk of data loss:</strong> Scripts stored in system folders can be lost when reinstalling the software or updating the operating system.</li></ul><p>If you already use <a href="https://medium.com/@aiscripts/how-to-set-up-keyboard-shortcuts-for-scripts-in-adobe-illustrator-98e0748dda8c">third-party script managers</a>, you likely keep your files in a dedicated directory — in that case, this guide may not be necessary. This article explains how to configure your system so the same scripts appear in the built-in <strong>File → Scripts</strong> menu across all Illustrator versions and devices using symbolic links (symlinks).</p><h4>What is a Symbolic Link?</h4><p>A symlink is often confused with a standard Windows shortcut or a macOS alias, but they differ technically:</p><ul><li><strong>A shortcut</strong> is a separate file that points to a target. Illustrator often fails to recognize scripts located inside a shortcut-folder.</li><li><strong>A symbolic link</strong> is a file-system object that redirects the OS to the target location. Illustrator treats it as a native folder, even though the data is stored elsewhere.</li></ul><h4>Choosing a Location</h4><p>Select a permanent home for your unified scripts folder based on your workflow:</p><ul><li><strong>Cloud Storage (Personal/Team):</strong> Place the folder in Dropbox, Google Drive, or a similar service. Adding a script on one computer will instantly sync it to your other devices and provide a backup.</li><li><strong>Local Server (Team):</strong> In an office environment, store the folder on a shared server so all designers have access to the same, up-to-date script library. But if there are problems in the local network, the scripts will be unavailable.</li></ul><h4>Creating a Symbolic Link</h4><ol><li>Create a master folder where your scripts will be stored. You can name it Ai_Scripts_Master or use the standard Scripts name (depending on your Illustrator localization).</li><li>Move all your scripts into this new folder.</li><li>Locate the original Scripts folder inside the Illustrator directory.</li><li>Delete it<strong>.</strong> We will create a symlink in its place.</li></ol><p>To create the link, you will need to run a single command in Terminal (macOS) or Command Prompt (Windows).</p><h4>macOS</h4><ol><li>Open Terminal.</li><li>Enter the following command:<br>sudo ln -s source_folder ai_presets_folder</li><li>To quickly get the path, type sudo ln -s , then drag your new master folder into the Terminal window.</li><li>Add a space, then drag the Illustrator Presets folder (where the original Scripts folder was) into the window. Append /Scripts to the end of that path.</li><li>Press Enter and provide your administrator password.</li></ol><p><strong>Example:</strong></p><p>sudo ln -s /Users/john/Desktop/My_Scripts /Applications/Adobe\ Illustrator\ 2026/Presets.localized/en_US/Scripts</p><h4>Windows</h4><ol><li>Open Command Prompt (CMD) as an Administrator.</li><li>Enter the command: mklink /D &quot;ai_presets_folder&quot; &quot;source_folder&quot;</li></ol><blockquote>To copy a folder path quickly, hold Shift, right-click the folder, and select Copy as path.</blockquote><blockquote><strong>Note:</strong> In Windows, the order is reversed: first, specify where the link should be created (the Illustrator folder), then where it points (your master folder).</blockquote><p><strong>Example:</strong></p><p>mklink /D &quot;C:\Program Files\Adobe\Adobe Illustrator 2026\Presets\en_US\Scripts&quot; &quot;C:\Users\john\Desktop\My_Scripts&quot;</p><h4>Important Notes</h4><ul><li><strong>Restart Required:</strong> Illustrator must be restarted to update the list in File → Scripts. You must restart the app every time you add or remove files. (Third-party managers are often more convenient as they scan folders automatically).</li><li><strong>Reverting Changes:</strong> To go back to the original setup, simply delete the symlink as if it were a regular folder. This will not delete your master folder. Then, create a new Scripts folder and move your files back.</li></ul><p>Symbolic links are a versatile tool — you can use them for other applications to sync settings, presets, or assets across multiple locations.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d19800012c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Set Up Keyboard Shortcuts for Scripts in Adobe Illustrator]]></title>
            <link>https://aiscripts.medium.com/how-to-set-up-keyboard-shortcuts-for-scripts-in-adobe-illustrator-98e0748dda8c?source=rss-6daeeede47cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/98e0748dda8c</guid>
            <category><![CDATA[adobe-illustrator]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[graphic-design]]></category>
            <category><![CDATA[adobe]]></category>
            <dc:creator><![CDATA[AiScripts]]></dc:creator>
            <pubDate>Mon, 20 Apr 2026 07:25:07 GMT</pubDate>
            <atom:updated>2026-06-09T01:51:02.827Z</atom:updated>
            <content:encoded><![CDATA[<p>Scripts, much like actions, plugins, and extensions, are essential tools for automating routine design tasks. However, the process of launching them in Illustrator is often a hassle. Navigating to <em>File → Scripts</em> and hunting for the right file in a long list every single time simply takes too long.</p><p>In Photoshop and InDesign, it’s much easier. Once you copy a script into the app folder, it automatically appears in the <em>Keyboard Shortcuts</em> menu. You simply assign a combo like Ctrl+Alt+H, and you’re good to go. Unfortunately, Illustrator lacks this native feature.</p><p>Luckily, there are workarounds using both Illustrator’s built-in tools and third-party utilities. In this guide, I’ve collected the best current methods for both Windows and macOS. To be clear: there is no universal ‘magic button.’ The choice of method and software depends on your operating system, your willingness to work with code, and the level of complexity required for your automation system.</p><h3>Methods</h3><ul><li>Built-in Actions Panel (Windows, macOS, Free)</li><li>AutoHotKey (Windows, Free)</li><li>Sppy (Windows, Free)</li><li>Automator (macOS, Free)</li><li>Hammerspoon (macOS, Free)</li><li>SPAi (macOS, Free)</li><li>Scripta (Windows, macOS Sequoia or newer, Free)</li><li>Alfred (macOS, Paid)</li><li>Keyboard Maestro (macOS, Paid)</li><li>BetterTouchTool (macOS, Paid)</li></ul><h3>Actions Panel</h3><p><strong>Requirements:</strong> Windows, macOS. Native Illustrator method.</p><p>The simplest way to trigger scripts using function keys F1–F15 (with or without Ctrl, Alt, or Shift) is to record them as an Action.</p><p>First, copy your script files (.jsx, .js) into the Illustrator system scripts folder and restart the app.</p><p><strong>macOS:</strong><br>/Applications/Adobe Illustrator [версия]/Presets.localized/[lang folder]/Scripts</p><p><strong>Windows:</strong><br>C:\Program Files\Adobe\Adobe Illustrator [vers.]\Presets\[lang folder]\Scripts\</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uIYFCe92pYQSCU24.jpg" /></figure><h4>Setup Actions</h4><ol><li>Go to <strong>Windows → Actions</strong>.</li><li>Create a <strong>New Set</strong>, then create a <strong>New Action</strong> inside it. Assign your desired hotkey and click <strong>Record</strong>.</li><li>Open the panel’s flyout menu (the hamburger icon) and select <strong>Insert Menu Item…</strong></li><li>In the text field that appears, start typing the name of your script — Illustrator should autocomplete it.</li></ol><blockquote>Alternative method: Keep the dialog box open, use your mouse to navigate to <strong>File → Scripts</strong>, and select the script from the list.</blockquote><p>5. Click <strong>OK</strong>, then hit the <strong>Stop</strong> button at the bottom of the Actions panel.</p><p><strong>Crash Warning</strong></p><p>Never use the Actions panel to run scripts that trigger other actions internally. Illustrator executes tasks sequentially. If a script attempts to launch a different action while the current one is still running, the app will freeze, and you risk losing unsaved work.</p><p><strong>How to Check Your Script</strong></p><p>Open the script file in any text editor (Notepad, TextEdit, Notepad++, Sublime) and search for the phrase app.doScript. If you find this line of code, this script is not compatible with the Actions panel method.</p><h3>AutoHotKey</h3><p><strong>Requirements:</strong> Windows. Free.</p><p>This free utility allows you to remap any key and build complex automation workflows in Windows. For our purposes, we are specifically interested in using it to trigger Illustrator scripts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DT37icbN2aeR3YGq.jpg" /></figure><h4>Setup AutoHotKey</h4><p>1. Download and unzip <a href="https://www.autohotkey.com/download/ahk-v2.zip">the AutoHotkey v2</a> archive.</p><p>2. Inside the program folder, create a new text file and name it <em>AutoHotkey64.ahk</em> (make sure the file extension is exactly .ahk).</p><p>3. Open the file in a code editor (like Notepad++ or Sublime Text) or just the standard Notepad, and paste the example code below. You only need to update the paths to point to your scripts folder and your Illustrator installation:</p><pre>#Requires AutoHotkey v2.0<br>#SingleInstance Force<br><br>#HotIf WinActive(&quot;ahk_exe Illustrator.exe&quot;)<br>  !1:: aiScript(&quot;script1&quot;)<br>  !2:: aiScript(&quot;script2&quot;)<br><br>aiScript(name) {<br>  static app := &quot;c:\Program Files\Adobe\Adobe Illustrator 2026\Support Files\Contents\Windows\Illustrator.exe&quot;<br>       , path := &quot;c:\Users\user\Documents\aiScripts&quot;<br>  if FileExist(script := name) <br>  or FileExist(script := path &quot;\&quot; name) <br>  or FileExist(script := path &quot;\&quot; name &quot;.jsx&quot;) <br>  or FileExist(script := path &quot;\&quot; name &quot;.js&quot;) <br>    Run(&#39;&quot;&#39; app &#39;&quot; &quot;&#39; script &#39;&quot;&#39;,, &quot;max&quot;)<br>}</pre><blockquote>In this example:<br>• Alt+1 launches c:\Users\user\Documents\aiScripts\script1.jsx<br>• Alt+2 launches c:\Users\user\Documents\aiScripts\script2.jsx</blockquote><p>3. Save the file.</p><p>4. Run AutoHotkey64.exe. The program will run in the background and minimize to the system tray.</p><p><strong>AHK Tips</strong></p><ul><li>Check <a href="https://www.autohotkey.com/docs/v1/Hotkeys.htm#Symbols">the list of codes</a> for Ctrl, Alt, Win, and other keys.</li><li>Read the official <a href="https://www.autohotkey.com/docs/v2/">AHK documentation</a>.</li><li>You can ask ChatGPT, Claude, DeepSeek, or other AI assistants to write AHK code for you.</li></ul><h3>Sppy</h3><p><strong>Requirements:</strong> Windows. Free.</p><p>A free Japanese wrapper utility for AutoHotkey. It provides a GUI for assigning shortcuts to scripts. Unfortunately, the interface is in Japanese; however, the primary configuration buttons are easy to memorize based on their layout. <a href="https://sppy.stars.ne.jp/sppyai">Official page</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yRlywZ2NdjA0VMax.jpg" /></figure><h4>Setup Sppy</h4><ol><li>Download and unzip the <a href="https://sppy.stars.ne.jp/ul/2021/06/Sppy_1_5.zip">Sppy</a> archive.</li><li>Run <em>Sppy_1_5.exe</em>. The app will run in the background in the system tray.</li><li>On the first launch, select your scripts folder.</li><li>Select a script from the list and click the button in the top-left corner.</li><li>In the pop-up window, click inside the input field, press your desired key combination (e.g., Alt+1), and click <strong>OK</strong>.</li></ol><blockquote>Alternative method<strong>:</strong> You can manually type the hotkeys into the input field on the main screen using AHK syntax. The button in the bottom-right corner opens a cheat sheet with key codes.</blockquote><p>6. To apply and save your changes, you must click the button in the top-right corner.</p><p>Sppy stores your configuration in a file named <em>HotkeySet.txt</em> inside its folder. You can simply copy this file to transfer your settings to another computer.</p><h3>Automator</h3><p><strong>Requirements:</strong> macOS. Native method.</p><p>Automator is a default macOS app designed to automate user tasks. You can use it to build workflows across different apps by simply dragging and dropping pre-made commands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ww-9hritbNhs8tLS.jpg" /></figure><h4>Setup Automator</h4><ol><li>Launch <strong>Automator</strong> and create a new document. Select <strong>Quick Action</strong> as the type (in older macOS versions, this was called <strong>Service</strong>).</li><li>In the top settings bar, set “Workflow receives” to <strong>no input</strong> in <strong>Adobe Illustrator</strong>.</li><li>In the left sidebar, search for <strong>Get Specified Finder Items</strong> and drag it into the main window. Click <strong>Add…</strong> to select your script file.</li><li>Next, search for <strong>Open Finder Items</strong>, drag it below the previous action, and select your Illustrator application from the dropdown list.</li><li>Save your new Quick Action with a clear name (e.g., “AI — BatchRenamer”).</li><li>Go to <strong>System Settings</strong> → <strong>Keyboard</strong> → <strong>Keyboard Shortcuts</strong> → <strong>Services</strong>.</li><li>Expand the <strong>General</strong> list. You will see your newly created Quick Action there. Click on the title and assign your desired hotkey.</li></ol><p>Your created Quick Actions are stored in the user system folder ~/Library/Services/. You can back them up or copy them to another Mac.</p><h3>Hammerspoon</h3><p><strong>Requirements:</strong> macOS. Free.</p><p>Hammerspoon is a free macOS utility, similar to AutoHotKey on Windows. It uses the LUA scripting language to write automation code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9uTYTtuM1I_AceCa.jpg" /></figure><p>I have created a free module specifically for finding and launching Illustrator scripts using Hammerspoon. Files and installation instructions are <a href="https://github.com/creold/hammerspoon-illustrator-scripts">available on GitHub</a>.</p><h3>SPAi</h3><p><strong>Requirements:</strong> macOS. Free.</p><p>A free Japanese utility specifically designed for launching Illustrator scripts. <a href="https://tama-san.com/spai/">Official page</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BeM1i9Risur58F2T.jpg" /></figure><h4>Setup SPAi</h4><ol><li>Download and unzip the <a href="https://tama-san.com/dl/files/SPAi-380.zip">SPAi</a> archive. Move the app to your <strong>Applications</strong> folder.</li><li>Launch <em>SPAi</em>.</li><li>By default, it shows the system Illustrator scripts folder. If you keep your scripts in a custom folder, open <strong>Preferences</strong> via the menu icon.</li><li>Select <strong>Display inside a register folder</strong> and click <strong>Register</strong> to choose your folder.</li><li>You can run scripts by double-clicking their names. To assign a hotkey, select a script, open the menu again, and choose <strong>Register Keyboard Shortcut…</strong></li><li>Press your desired key combination — it will appear in the second column — and click <strong>Save</strong>.</li></ol><blockquote>If you encounter issues with SPAi v3.8 on newer macOS versions and Apple Silicon chips, please try downloading the previous release, <a href="https://tama-san.com/app-page/unnotarized.html">SPAi v3.7.6</a>.</blockquote><p>You can use the <strong>Show the Setting file in Finder</strong> button to locate the configuration files and copy them to another Mac.</p><h3>Scripta</h3><p><strong>Requirements:</strong> macOS Sequoia or newer. Free.</p><p>A free Japanese utility designed to launch scripts for Adobe Illustrator, Photoshop, and InDesign. In terms of interface and configuration, it is similar to SPAi. <a href="https://iwashi.org/app/scripta/ja/index.html">Official page</a><strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7o8w4jfIs30GCCkgxNN-mg.jpeg" /></figure><h4>Setup Scripta</h4><ol><li>Download and extract the latest version of <a href="https://github.com/Yamonov/Scripta/releases/download/v1.8/Scripta-1.8.zip">Scripta</a>. Move the application to your <strong>Applications</strong> folder.</li><li>Launch <em>Scripta</em>.</li><li>Upon the first launch, the utility will be collapsed at the top of your screen. Click it to expand the interface.</li><li>From the dropdown menu, go to <strong>Preferences &gt; Script Folders</strong> and select the folder containing your Illustrator scripts.</li><li>You can run scripts by double-clicking their name in the list. To assign a hotkey, right-click the script and select <strong>Register Shortcut</strong>.</li><li>The <strong>Shortcuts</strong> menu will open. Click in the right-hand column labeled <strong>Shortcut Key</strong> and press your desired key combination for that script.</li></ol><p>Additionally, via the dropdown menu, you can customize the utility’s collapsed size, screen position, and other visual settings.</p><h3>Alfred</h3><p><strong>Requirements:</strong> macOS. Powerpack license required (~£34).</p><p>Alfred is an advanced hybrid of Spotlight-style search and Automator-like workflow automation. The free version works great as a quick launcher, but to manage scripts and create custom hotkeys, you will need to purchase the Powerpack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*So_osPoN_9GTSsUh.jpg" /></figure><h4>Setup Alfred</h4><ol><li>Install <a href="https://www.alfredapp.com/powerpack/">Alfred Powerpack</a> and launch it.</li><li>Go to the <strong>Workflows</strong> tab. Click the <strong>+</strong> button at the bottom of the list and select <strong>Blank Workflow</strong>. Give it a name, for example, “AI Scripts”.</li><li>Right-click on the empty canvas and select <strong>Triggers → Hotkey</strong>.</li><li>In the first tab, assign your desired key combination. In the second tab, <strong>Related Apps</strong>, drag and drop Adobe Illustrator. This ensures the hotkey only works when Illustrator is the active window, preventing conflicts with other apps. Click <strong>Save</strong>.</li><li>Next to it, right-click again and select <strong>Actions → Open File</strong>.</li><li>A settings window will appear. Drag your script file into the left box, and drag Adobe Illustrator into the right box.</li><li>You now have two blocks on the canvas: the <strong>Hotkey</strong> and the <strong>Action</strong>. Hover over the right edge of the <strong>Hotkey</strong> block and drag a connecting line to the <strong>Action</strong> block to link them.</li></ol><p>You can repeat steps 3–7 within the same Workflow window to create as many “hotkey — script” pairs for Illustrator as you need.</p><h4><strong>Bonus: Alfred Spotlight Search</strong></h4><p>If you have too many scripts to remember hotkeys for, it’s often easier to use a dedicated Spotlight-style search window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*es_Vpl5P1hQTlTra.jpg" /></figure><ol><li>Download <a href="https://ais.sergosokin.ru/dl/Alfred_Illustrator_Spotlight.zip">Alfred_Illustrator_Spotlight</a>.</li><li>Double-click the file to install it into Alfred. You will see a workflow diagram consisting of three blocks.</li><li>Click the <strong>Hotkey</strong> block and set the combination that will open the script search bar.</li><li>Click the <strong>File Filter</strong> block. In the <strong>Scope</strong> tab, use the <strong>+</strong> button to add the folders where your scripts are stored. Alfred will only search for filenames within these specific locations.</li><li>Click the <strong>Open File</strong> block. Leave the left box empty, but drag Adobe Illustrator into the <strong>right box</strong>.</li></ol><h3>Keyboard Maestro</h3><p><strong>Requirements:</strong> macOS. License required (~$36).</p><p>A powerful automation powerhouse. Its main strength lies in building complex macros (chains of actions) and its flexible triggers. You can trigger actions not just by key presses, but also by connecting USB devices, specific times of day, or system events.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qnO0Z6_4d7Fy6RnT.jpg" /></figure><h4>Setup Keyboard Maestro</h4><ol><li>Install <a href="https://www.keyboardmaestro.com/">Keyboard Maestro</a> and launch it.</li><li>In the <strong>Groups</strong> column on the left, click <strong>+</strong> (New Group).</li><li>In the group settings panel, look for <strong>Available in these applications</strong>. Select your version of Adobe Illustrator from the dropdown menu. This ensures these macros only run when you are working in Illustrator.</li><li>Create a <strong>New Macro</strong>.</li><li>Click <strong>New Trigger</strong> and select <strong>Hot Key Trigger</strong>.</li><li>Press your desired key combination.</li><li><strong>Pro Tip:</strong> To the right of the input field, there is a dropdown menu where you can select the press type: <em>tapped once</em>, <em>tapped twice</em>, <em>long press</em>, etc. This allows you to assign different scripts to the exact same hotkey depending on how you press it.</li><li>Click <strong>New Action</strong>. Search for <strong>Execute AppleScript</strong> in the left sidebar.</li><li>Paste the code into the field, replacing the file path with your own:</li></ol><pre>tell application &quot;Adobe Illustrator&quot;<br>  activate<br>  do javascript file &quot;/Users/username/MyScripts/Script.jsx&quot;<br>end tell</pre><blockquote>How to get the path: Find the file in Finder, right-click it, hold down the Alt (<em>⌥</em>) key, and select <strong>Copy as Pathname</strong>.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*X0C6m3YxO8CMdmJ-.jpg" /></figure><h4><strong>Alternative Method (No Code)</strong></h4><ol><li>In your new macro, instead of AppleScript, search for the action <strong>Open a File, Folder or Application</strong>. Drag your Illustrator script file into the file field.</li><li>In the “with:” dropdown menu, change usage from <em>Default Application</em> to your specific Adobe Illustrator version.</li></ol><h4><strong>Bonus: Macro Search</strong></h4><p>Keyboard Maestro allows you to create a “palette” or search bar to trigger macros by name. This is handy if you have dozens of scripts and struggle to remember every single hotkey.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L-C0X3Qjm50HjR8A.jpg" /></figure><ol><li>Create a new macro and assign a hotkey to it.</li><li>Add the action <strong>Trigger Macro by Name</strong>.</li></ol><h3>BetterTouchTool</h3><p><strong>Requirements:</strong> macOS. License required (~$14–24).</p><p>BetterTouchTool (BTT) is the ultimate customization tool for Mac input devices. It allows you to create custom actions for your Trackpad, Mouse, Keyboard, and even the Touch Bar on Macbooks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ENoG3Juj2doiXU1k.jpg" /></figure><h4>Setup BetterTouchTool</h4><ol><li>Install <a href="https://folivora.ai/">BetterTouchTool</a> and launch it.</li><li>In the left sidebar, select (or add) <strong>Adobe Illustrator</strong>.</li><li>Create a new trigger (this can be a trackpad gesture, a Touch Bar button, or a keyboard shortcut).</li><li>Click <strong>Assign First Action</strong>, then search for and select <strong>Run Apple Script (async in background)</strong>.</li><li>Paste the following code into the field, replacing the file path with your own:</li></ol><pre>tell application &quot;Adobe Illustrator&quot;<br>  activate<br>  do javascript file &quot;/Users/username/MyScripts/Script.jsx&quot;<br>end tell</pre><blockquote>How to get the path: Find the file in Finder, right-click it, hold down the <em>Alt (⌥)</em> key, and select <strong>Copy as Pathname</strong>.</blockquote><h3>Which Method Should You Choose?</h3><p>As you can see, there are various solutions for triggering scripts with keyboard shortcuts — it all comes down to your specific workflow and operating system. Here are my recommendations:</p><ul><li><strong>For a quick start:</strong> Use the <strong>Actions</strong> panel. This is sufficient if you only need to assign shortcuts to 5–10 essential scripts and prefer not to install additional software.</li><li><strong>For Windows users:</strong> Use <strong>AutoHotkey</strong>. While it involves coding, once you understand the syntax (or use AI assistants to generate scripts), you can automate not only Illustrator but your entire OS.</li><li><strong>For macOS users:</strong> If you prefer a simple interface, install the free <strong>SPAi</strong>. If you want to automate system-wide tasks beyond Illustrator, consider paid options like <strong>Keyboard Maestro</strong> or <strong>BetterTouchTool</strong>.</li></ul><p>Personally, I have settled on a <a href="https://github.com/creold/hammerspoon-illustrator-scripts">custom module for the free <strong>Hammerspoon</strong></a>. This solution requires some initial configuration, but it ultimately covered all my needs for script shortcuts and searching files by name within folders.</p><blockquote>You can find a collection of my custom automation scripts in my <a href="https://github.com/creold/illustrator-scripts"><strong>GitHub repository</strong></a>. These tools are open-source and designed to streamline common tasks in Adobe Illustrator.</blockquote><p><em>Ask me: e-mail </em><a href="/service/mailto:hi@sergosokin.ru"><em>hi@sergosokin.ru</em></a><em> or Telegram: </em><a href="https://t.me/sergosokin"><em>https://t.me/sergosokin</em></a></p><p><em>You can follow my </em><a href="https://t.me/aiscripts"><em>Telegram channel</em></a><em> to stay informed about the latest script updates and development news.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98e0748dda8c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Non-Latin Spot Color Names in Swatch Groups]]></title>
            <link>https://aiscripts.medium.com/non-latin-spot-color-names-in-swatch-groups-2cd075e6ae82?source=rss-6daeeede47cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/2cd075e6ae82</guid>
            <category><![CDATA[extendscript]]></category>
            <category><![CDATA[graphic-design]]></category>
            <category><![CDATA[adobe-illustrator]]></category>
            <dc:creator><![CDATA[AiScripts]]></dc:creator>
            <pubDate>Wed, 18 Mar 2026 03:45:08 GMT</pubDate>
            <atom:updated>2026-03-18T03:45:08.426Z</atom:updated>
            <content:encoded><![CDATA[<p>When a script moves a spot or global color swatch into a group, the encoding of its name may become corrupted.</p><h4>The Issue</h4><p>In Adobe Illustrator scripting, the SwatchGroup object provides two methods for adding swatches to a group: mySwatchGroup.addSwatch(mySwatch) for process colors and mySwatchGroup.addSpot(mySwatch) for spot or global colors.</p><p>While process colors behave as expected, moving a global swatch with a non-Latin name (Cyrillic, Arabic, Asian, etc.) triggers an automatic encoding shift that mangles the name.</p><p>This bug occurs regardless of whether the swatch and group already exist in the document or are created at runtime. The addSpot() method consistently corrupts non-Latin names across all versions from CS6 to the current 2026 release, on both macOS and Windows.</p><pre>var doc = app.activeDocument;<br><br>// 1. Create a color group<br>var targetGroup = doc.swatchGroups.add();<br>targetGroup.name = &#39;Spot_Test&#39;;<br><br>// 2. Create a color object<br>var swatchColor = new CMYKColor();<br>swatchColor.cyan = 80;<br><br>// 3. Create a swatch with a name in Cyrillic or another language<br>var newSwatch = doc.spots.add();<br>newSwatch.name = &#39;Синий&#39;;<br>newSwatch.colorType = ColorModel.SPOT;<br>newSwatch.color = swatchColor;<br><br>// 4. Moving a swatch to a group<br>targetGroup.addSpot(newSwatch);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*8kkY14bhHWsZqZ95vjkoBQ.gif" /><figcaption>The name encoding is corrupted</figcaption></figure><h3>The Workaround</h3><p>If you are creating a new swatch, a reliable approach is to let Illustrator assign a default name (e.g., “Spot Color”) during creation. You can then move the swatch into the desired group and only assign the final non-Latin name <em>after</em> the move is complete.</p><pre>var doc = app.activeDocument;<br><br>// 1. Create a color group<br>var targetGroup = doc.swatchGroups.add();<br>targetGroup.name = &#39;Spot_Test&#39;;<br><br>// 2. Create a color object<br>var swatchColor = new CMYKColor();<br>swatchColor.cyan = 80;<br><br>// 3. Create an unnamed swatch<br>var newSwatch = doc.spots.add();<br>newSwatch.colorType = ColorModel.SPOT;<br>newSwatch.color = swatchColor;<br><br>// 4. Moving a swatch to a group<br>targetGroup.addSpot(newSwatch);<br><br>newSwatch.name = &#39;Синий&#39;; // The name is applied after moving</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*a9DzWo-bN0POaF_YnHs4fw.gif" /><figcaption>Name encoding preserved</figcaption></figure><p>For existing swatches, the solution follows a simple “capture and restore” logic:</p><ol><li>Store the original non-Latin name in a variable.</li><li>Move the swatch into the group using addSpot().</li><li>Re-assign the stored name to the swatch to overwrite the corrupted string.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2cd075e6ae82" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Swatch Groups Issue]]></title>
            <link>https://aiscripts.medium.com/swatch-groups-undo-crash-534ac40bcf9c?source=rss-6daeeede47cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/534ac40bcf9c</guid>
            <category><![CDATA[graphic-design]]></category>
            <category><![CDATA[extendscript]]></category>
            <category><![CDATA[adobe-illustrator]]></category>
            <dc:creator><![CDATA[AiScripts]]></dc:creator>
            <pubDate>Fri, 12 Dec 2025 13:11:33 GMT</pubDate>
            <atom:updated>2026-01-07T05:15:41.990Z</atom:updated>
            <content:encoded><![CDATA[<p>If a script uses the swatch group creation method swatchGroups.add() in combination with undo actions via app.undo(), it can cause Illustrator to crash.</p><h4>The Issue</h4><p>The workflow of “Create Object — Redraw — Undo — Create New Object” is a standard pattern used in scripting to provide dynamic previews. However, when working with swatch groups, a crash occurs.</p><p>The crash happens when recreating a swatch group after app.undo(), but only under a specific Swatches panel state in Illustrator:</p><ul><li><strong>List View:</strong> In this panel mode, Illustrator consistently crashes.</li><li><strong>Thumbnail View:</strong> In this mode, the bug doesn’t reproduce, and the script works correctly.</li></ul><p>The current ExtendScript API doesn’t provide a way to programmatically check which view mode the user’s Swatches panel is in.</p><pre>// 1. Create the first color group<br>var swGroup1 = app.activeDocument.swatchGroups.add();<br>swGroup1.name = &quot;Swatch_Group_v1&quot;;<br>app.redraw();<br><br>// 2. Undo the creation<br>app.undo();<br><br>// 3. Attempt to create a new group<br>// If the Swatches panel is in List View, Illustrator will crash here<br>var swGroup2 = app.activeDocument.swatchGroups.add();<br>swGroup2.name = &quot;Swatch_Group_v2&quot;;<br>app.redraw();</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*a9FyDpbp6-h4SD2z_u5eVA@2x.gif" /></figure><h4>Environment and Versions</h4><p>The bug is reproducible on both Mac and PC across various previous versions of Illustrator. In CC 2026 v30.0–30.1, the bug in List View mode is currently not observed — possibly resolved due to some changes in the Swatches panel. However, consider the risk that the issue may return in future releases.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=534ac40bcf9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to apply effects via XML]]></title>
            <link>https://aiscripts.medium.com/how-to-apply-effects-via-xml-7d6f75d01238?source=rss-6daeeede47cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d6f75d01238</guid>
            <category><![CDATA[adobe-illustrator]]></category>
            <category><![CDATA[extendscript]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[graphic-design]]></category>
            <dc:creator><![CDATA[AiScripts]]></dc:creator>
            <pubDate>Sun, 20 Apr 2025 14:26:17 GMT</pubDate>
            <atom:updated>2025-04-20T14:26:17.781Z</atom:updated>
            <content:encoded><![CDATA[<p>Adobe Illustrator’s scripting API is modest. Many actions that are performed manually through menu commands are not available through ExtendScript.</p><p>Since CS6, in addition to the app.executeMenuCommand(name) command, which executes <a href="https://community.adobe.com/t5/illustrator-discussions/executemenucommand-command-list/td-p/13131490">menu commands by key name</a>, the object.applyEffect(xmlString) command has been added to the scripting API.</p><h4>What is applyEffect()</h4><p>The applyEffect() command allows you to apply effects from the Effect menu to selected objects directly from the script. This means that we can, for example, set rounded corners or a shadow effect with a single line of code. But we need to know what XML to pass to this command.</p><p>Here’s an example that applies the Stylize → Round Corners effect with a size of 30 px:</p><pre>var item = app.selection[0];<br>var roundXML = &#39;&lt;LiveEffect name=&quot;Adobe Round Corners&quot;&gt;&lt;Dict data=&quot;R radius 30 &quot;/&gt;&lt;/LiveEffect&gt;&#39;;<br>item.applyEffect(roundXML);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*SU4OFYjUQDwF3jg6XnAqzA@2x.gif" /></figure><h4>How to find the right XML for effects</h4><p>This is where the most interesting part begins. There is, of course, no documentation for this command. But there is a way to get the required XML parameter by literally “peeking” at it from within Illustrator.</p><p>In older versions of Illustrator, <a href="https://community.adobe.com/t5/user/viewprofilepage/user-id/9300165">Carlos Canto</a> suggested using the FXG format to export a document with an object. <a href="https://community.adobe.com/t5/user/viewprofilepage/user-id/13791991">Mark m1b</a> suggests:</p><ol><li>Create an object in a blank document.</li><li>Apply an effect to it.</li><li>Save the .ai file uncompressed.</li><li>Use a text editor to find the effect data by name.</li></ol><p>Mark wrote <a href="https://community.adobe.com/t5/illustrator-discussions/scripting-live-effects/m-p/11744702">the entire process of finding and preparing the XML</a> on the Adobe Community. Mark has also created <a href="https://github.com/mark1bean/live-effect-functions-for-illustrator/tree/master">a free library of functions for each effect</a> to use in scripts. In it, you can search the XML for your script.</p><h4>How to expand effects</h4><p>The effect is added to the object in the Appearance panel. But maybe you want to turn it into a simple vector object without an appearance right away?</p><p>Manually, the appearance is expanded via Object → Expand Appearance. But we’re talking about scripts, so we can call this menu with app.executeMenuCommand() while the object is still selected.</p><pre>app.executeMenuCommand(&#39;expandStyle&#39;);</pre><p>There is a problem if you want to apply the effect and expand to occur one after the other in the script. After applyEffect(), Illustrator does not update the document state before calling Object → Expand Appearance.</p><p>Here’s an example that applies the Distort &amp; Transform → Twist… effect to a 1080 degree angle and tries to expand it at once:</p><pre>var item = app.selection[0];<br>var twistXML = &#39;&lt;LiveEffect name=&quot;Adobe Twirl&quot; isPre=&quot;1&quot;&gt;&lt;Dict data=&quot;R angle 1080 &quot;/&gt;&lt;/LiveEffect&gt;&#39;;<br>item.applyEffect(twistXML);<br>app.executeMenuCommand(&#39;expandStyle&#39;);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*34K7TcKBBvKcWiIWPnsjZw@2x.gif" /><figcaption>The effect was not added in the Appearance panel before running Expand Appearance</figcaption></figure><p>So between the two commands, you need to insert some action that will cause the Illustrator interface to update its contents. Usually app.redraw() is used to force an update, but after that an extra step is added to the document history.</p><p>I suggest, for example, to switch the visibility of the object’s edges using the menu View → Show/Hide Edges. To do this, call the menu command twice to toggle it to the opposite value and back again. This does not change the history of the document, so we can cancel the script action by pressing Ctrl/Cmd+Z.</p><pre>var item = app.selection[0];<br>var twistXML = &#39;&lt;LiveEffect name=&quot;Adobe Twirl&quot; isPre=&quot;1&quot;&gt;&lt;Dict data=&quot;R angle 1080 &quot;/&gt;&lt;/LiveEffect&gt;&#39;;<br>item.applyEffect(twistXML);<br><br>// Switch edges<br>app.executeMenuCommand(&#39;edge&#39;);<br>app.executeMenuCommand(&#39;edge&#39;);<br><br>app.executeMenuCommand(&#39;expandStyle&#39;);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*cWQp9Eb6mJlMm7oc5EID_g@2x.gif" /><figcaption>The effect has been added and expanded</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d6f75d01238" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[App.selection limit]]></title>
            <link>https://aiscripts.medium.com/app-selection-limit-03e0b441ebe3?source=rss-6daeeede47cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/03e0b441ebe3</guid>
            <category><![CDATA[adobe-illustrator]]></category>
            <category><![CDATA[extendscript]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[graphic-design]]></category>
            <dc:creator><![CDATA[AiScripts]]></dc:creator>
            <pubDate>Mon, 20 Jan 2025 04:46:41 GMT</pubDate>
            <atom:updated>2025-09-18T08:30:52.720Z</atom:updated>
            <content:encoded><![CDATA[<p>In ExtendScript for Adobe Illustrator, you can select all objects in an array in a document by assigning an app.selection collection.</p><pre>var doc = app.activeDocument;<br>var arr = [doc.pathItems[0], doc.pathItems[1]];<br>app.selection = arr;</pre><p>However, Adobe’s documentation does not mention an important limitation that can cause scripts to work incorrectly. Assigning an array to app.selection will select a maximum of 1000 objects — the first in order in the user’s array. Other objects are ignored and not selected by the script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*EKy-FULfxxK0c3gQISRMfg@2x.gif" /></figure><h4>Solution #1</h4><p>With the same speed, you can select any object in the array through a for loop by toggling the selected boolean property.</p><pre>var counter = arr.length;<br>for (var i = 0; i &lt; counter; i++) {<br>  arr[i].selected = true;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*wA06D5gzlfu8FWxhOCI9_w@2x.gif" /></figure><p>All objects in the array are selected, but in this example, waiting 38 seconds is too long. With a larger number of objects, the loop will run longer: minutes, tens of minutes. Performance is especially bad on low-spec PC and Mac.</p><h4>Solution #2</h4><p>Assume that an object is selected quickly in Illustrator. If all the objects in the array are in the same group, they will be selected quickly.</p><p>Let’s create a temporary group in the script and place the objects in it. Taking advantage of the fact that objects stay selected in Illustrator after ungrouping, we can ungroup our temporary group and return the objects to their places in the layers.</p><pre>function selectItems(arr) {<br>  if (Object.prototype.toString.call(arr) !== &#39;[object Array]&#39;) return;<br>  if (!arr.length) return;<br><br>  var tempLayer = app.activeDocument.layers.add(); // Get a layer for the group<br>  tempLayer.name = &#39;__tempSelectionLayer__&#39;;<br>  var tempGroup = tempLayer.groupItems.add(); // Create a temporary group for objects<br>  var tempPairs = []; // Create temporary array for objects<br><br>  // Add temporary paths before each source in layer<br>  // And we move the original objects to the group<br>  for (var i = 0; i &lt; arr.length; i++) {<br>    try {<br>      var tempItem = tempLayer.pathItems.add();<br>      tempItem.move(arr[i], ElementPlacement.PLACEBEFORE);<br>      arr[i].move(tempGroup, ElementPlacement.PLACEATEND);<br>      tempPairs.push({ &#39;placeholder&#39;: tempItem, &#39;original&#39;: arr[i] });<br>    } catch (err) {<br>      if (tempItem) tempItem.remove();<br>    }<br>  }<br><br>  tempGroup.selected = true;<br><br>  // Move the original objects from the group to their positions<br>  // Remove the temporary paths<br>  for (var j = tempPairs.length - 1; j &gt;= 0; j--) {<br>    var placeholder = tempPairs[j].placeholder;<br>    var original = tempPairs[j].original;<br>    try {<br>      original.move(placeholder, ElementPlacement.PLACEBEFORE);<br>      placeholder.remove();<br>    } catch (err) {<br>      try { placeholder.remove(); } catch (err) {}<br>    }<br>  }<br><br>  try { tempGroup.remove(); } catch (err) {}<br>  try { tempLayer.remove(); } catch (err) {}<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*ee_YVjEomgUltRi0DQxgBw@2x.gif" /></figure><p>The time difference is impressive, and on tens of thousands of objects it is measured in seconds, not minutes, even on old computers. In various tests, after moving to and from a group of objects, the hierarchy in layers is preserved.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=03e0b441ebe3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to write scripts for Adobe Illustrator]]></title>
            <link>https://aiscripts.medium.com/how-to-write-scripts-for-adobe-illustrator-263dbd515baa?source=rss-6daeeede47cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/263dbd515baa</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[graphic-design]]></category>
            <category><![CDATA[adobe]]></category>
            <category><![CDATA[extendscript]]></category>
            <dc:creator><![CDATA[AiScripts]]></dc:creator>
            <pubDate>Fri, 12 Jan 2024 10:32:01 GMT</pubDate>
            <atom:updated>2026-02-05T06:41:30.517Z</atom:updated>
            <content:encoded><![CDATA[<h4>Learn why a designer needs scripts in Adobe applications and where to start learning them</h4><h3>What are scripts?</h3><p>In the context of Adobe software, a script is a program, often small in size, that performs a specific task, usually to automate repetitive operations. Scripts may work without a user interface, carrying out tasks in the background.</p><p>For a graphic designer, scripts can make life easier by automating routine operations, generating objects, changing colors, exporting data, processing files, and much more. All these tasks can be done manually, but scripts save time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*aFuEqcuXtzs7M2bGnBnoBg.gif" /><figcaption>Parking permits generation with numbering</figcaption></figure><h3>Scripts, Extensions, and Plugins</h3><p>Scripts and extensions are similar. They perform actions in a document using the ExtendScript language. However, extensions have their user interface built with HTML + CSS + JS. Extensions can interact with a web server and leverage advanced JS capabilities.</p><blockquote><em>ExtendScript is an ancient relic of Adobe, a language based on Javascript ECMAScript 3 from 1999</em></blockquote><p>Plugins are complete modules in C++ installed in Adobe software. They add new tools, filters, and effects, similar to plugins from <a href="https://astutegraphics.com/">Astute Graphics</a>.</p><p>Next, I will talk about learning ExtendScript in the context of Adobe Illustrator, but the essence is applicable to other Adobe programs.</p><h3>Pros of Scripts</h3><p><strong>Automation.</strong> Scripts eliminate the need to spend time on routine tasks. Although in simple cases, you can expedite work manually with recorded actions without programming.</p><p><strong>Speed of Writing.</strong> A dozen lines of code, and a straightforward operation is automated. For example, replacing spaces in artboard names. Conveniently, scripts can be executed from anywhere without installing them in the Illustrator scripts folder. Extensions and plugins are much more complicated in this regard.</p><p><strong>Versatility.</strong> Scripts work on both Windows and macOS. They usually do not depend on the Illustrator version, although occasionally Adobe engineers may disrupt the functionality of scripts with a new Illustrator release. On the other hand, plugins need to be written separately for each system and Illustrator version.</p><p><strong>Functionality.</strong> Scripts are tailored for specific tasks, saving time. They are flexible and capable of tackling complex challenges.</p><h3>Cons of Scripts</h3><p><strong>Performance.</strong> Scripts operate slower than plugins on large data. Keep in mind that the computer configuration also influences the speed of scripts.</p><p><strong>Capabilities</strong>. Due to Adobe’s limited investment in the development of the ExtendScript language, the capabilities of scripts are more modest compared to plugins. For instance, scripts cannot extract information about the colors of pixels in raster images and cannot modify certain gradient properties.</p><h3>How to Start Writing Scripts</h3><p>Learn the syntax and principles of JavaScript, upon which ExtendScript is built. This is already half the journey. Knowledge of best practices and typical patterns, which can be gleaned from articles about JS, will be useful for scripting. This will help you write structured code from the beginning.</p><p>In terms of basic JS knowledge — mathematical operators, data types, loops — you can refer to resources like <a href="https://javascript.info/">Javascript Info</a>, <a href="https://www.learn-js.org/">Learn JavaScript</a>.</p><p>Foundation:</p><ul><li>Variable declaration using var;</li><li>Conditional statements if, else, switch;</li><li>Loops for…, while…, for…in;</li><li>Function and object definition {};</li><li>Exception handling try…catch.</li></ul><p>However, you’ll need to sift through information about JS for web browsers and functions from standards newer than ES3. For example, ES5 array methods like forEach, map, filter, string trim, JSON handling won’t work, but you can write equivalent functions (polyfills) for the ES3 standard.</p><blockquote><em>For simple scripts, it’s not necessary to be a seasoned, bearded programmer. Basics will be sufficient</em></blockquote><p>With basic knowledge of JavaScript and ExtendScript, you’ll be able to read others’ scripts and even make your own modifications. If you want to automate various tasks in Illustrator and tackle complex processes, learning and gaining experience may take a while, but you’ll achieve results.</p><h3>Immersing into ExtendScript</h3><p>Primarily, in scripts, you will be manipulating document objects from this tree (DOM — document object model).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*IIfG-XyXFFfUWtZR1_PzDQ@2x.png" /><figcaption>The Illustrator Scripting Object Model</figcaption></figure><h4><strong>Documentation</strong></h4><p>In <a href="https://developer.adobe.com/console/servicesandapis">Adobe’s developer console</a>, you can access the PDF documentation “Illustrator JS Reference”, “Illustrator Scripting Guide“ in English, where you can find information about Illustrator objects and their properties with some code examples. Kazuhiro Furuhata’s website has a <a href="http://www.openspc2.org/reibun/Illustrator/ref/">reference for the object model</a> and <a href="http://www.openspc2.org/book/IllustratorCC2015/">automation examples</a> — the site is translated from Japanese using Google Translate. On my website (RU), all links are compiled in the “<a href="https://ais.sergosokin.ru/resources/">Resources</a>” section. I recommend reading the manuals and simultaneously analyzing scripts from other authors. The list of websites with scripts from some authors is also available on my website.</p><h4><strong>Tutorials</strong></h4><p>On YouTube, you can find basic English tutorials on scripting, such as those by <a href="https://www.youtube.com/@NTProductions/videos">Nate Lovell</a>, <a href="https://www.youtube.com/@wc7/videos">William Campbell</a>, or articles with simple examples. It’s suitable for getting acquainted, but you won’t find a lot of information there. I haven’t come across comprehensive courses on Illustrator scripts.</p><h4><strong>Adobe Community</strong></h4><p>On <a href="https://community.adobe.com/t5/illustrator/ct-p/ct-illustrator?page=1&amp;sort=latest_replies&amp;filter=all&amp;lang=all&amp;tabid=discussions&amp;topics=label-scripting">the Adobe forums</a>, users often ask questions like, “Help me write a script”, where you can study others’ solutions, and sometimes multiple authors offer their script variations. It’s akin to design, where you study other designers’ work to understand why a project was done in a certain way.</p><h4><strong>Editors (IDE)</strong></h4><p>Adobe has its development environment — ExtendScript Toolkit, the latest update of which was in 2011. ESTK includes a built-in guide, auto-completion of entered code, and step-by-step debugging. The <a href="https://github.com/psyirius/extendscript-archive/tree/main/estk/installers">archive of ESTK versions is on GitHub.</a> Although I prefer writing scripts in VSCode with configured plugins, including <a href="https://marketplace.visualstudio.com/items?itemName=hennamann.jsx">ExtendScript</a>, <a href="https://marketplace.visualstudio.com/items?itemName=Adobe.extendscript-debug">ExtendScript Debugger</a>, and a set of my own snippets — blocks of frequently used code in scripts. You can write code in Sublime, Notepad++, or even a text editor — wherever you feel comfortable.</p><h3>Regular Expressions</h3><p>Regular expressions from JavaScript, as an additional foundation, come in handy for working with text, object names, and data type validation. Read about regular expressions on <a href="https://proglib.io/p/learn-regex">Prooglib</a>, <a href="https://regexlearn.com/">RegexLearn</a>, <a href="https://cheatography.com/davechild/cheat-sheets/regular-expressions/">Cheatography</a>.</p><pre>// Change the opacity of text beginning with a specific character<br>var doc = app.activeDocument;<br>for (var i = 0; i &lt; doc.textFrames.length; i++) {<br>  var text = doc.textFrames[i].contents;<br>  if (/^(А|Р|У)/.test(text)) {<br>    doc.textFrames[i].opacity = 20;<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*0fe6hrCkEnxW9Cmj8MiHGw.gif" /><figcaption>The regular expression checks for the presence of one of the following uppercase characters at the beginning of the string</figcaption></figure><h3>ChatGPT</h3><p>Since 2022, developers have increasingly started utilizing neural networks for code generation. For instance, ChatGPT can write scripts for Illustrator, even in the free 3.5 model. If registration for ChatGPT is not available in your region, you can use the <a href="https://gemini.google.com/">Google Gemini</a>, the <a href="https://huggingface.co/chat/">HuggingChat</a>, the <a href="https://openchat.team/">Openchat</a>, the <a href="https://chat.deepseek.com/">DeepSeek</a> chatbots, although it generates scripts slightly less effectively, or install plugins like <a href="https://marketplace.visualstudio.com/items?itemName=Bito.Bito">Bito</a> or <a href="https://marketplace.visualstudio.com/items?itemName=Rubberduck.rubberduck-vscode">Rubberduck</a> in VSCode.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*s_yrM3261wm3G4P9n9WPWw.jpeg" /><figcaption>Prompt in ChatGPT for a script that randomly recolors the characters of selected text</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*65H9KFqs08ZFolp72gDJ6A.gif" /></figure><h4>Pros of AI</h4><p><strong>Quick Start.</strong> ChatGPT can rapidly generate tips and code examples with explanations, accelerating problem-solving and aiding in learning.</p><p><strong>Sequence.</strong> Neural networks can be used to extend, modify, or fix existing code.</p><h4>Cons of AI</h4><p><strong>Limited Knowledge.</strong> The neural network knows only what it has been trained on (ChatGPT 3.5 with data up to January 2022). It lacks knowledge of all the intricacies of scripting and errors in various versions of Illustrator.</p><p><strong>Code Errors.</strong> AI sometimes produces incorrect code, requiring additional user verification and corrections. Therefore, gaining personal knowledge and experience in scripting is advisable. In the example with randomly colored text characters, I had to refine the ChatGPT prompt several times and point out syntax errors to the neural network.</p><p><strong>Lack of Context Understanding.</strong> Results depend on the phrasing of queries, sometimes requiring numerous iterations and clarifications, consuming time.</p><p><strong>Testing.</strong> ChatGPT does not test the code for you. Users must independently test the generated script in Illustrator. If errors occur and you lack personal knowledge, identifying whether the problem lies in the neural network’s code or Illustrator can be challenging. In the case of the “<a href="https://community.adobe.com/t5/illustrator-discussions/recolor-with-closest-pantone-match/td-p/13716401">Recolor with closest Pantone match</a>” topic, a user attempted to generate a script with ChatGPT, converting a regular color to the closest Pantone. The neural network generated seemingly logical code but with non-existent methods in the ExtendScript language, something the designer couldn’t be aware of, as they are not proficient in scripting.</p><h3>Conclusions</h3><p>Writing scripts for Illustrator doesn’t necessarily mean becoming a programmer. Simply, step by step, learn the essential parts of JavaScript and ExtendScript, focusing on solving tasks relevant to you.</p><p>Even a basic understanding of if statements, for… loops, regular expressions, and the <em>PathItem</em> object model will enable you to work with vector paths in the document.</p><pre>// Change the width of the paths to at least 50px<br>var paths = app.selection;<br>var length = paths.length;<br>var newWidth = 50;<br>for (var i = 0; i &lt; length; i++) {<br>  if (paths[i].width &lt; 50) {<br>    paths[i].width = 50;<br>  }<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*c-Zk77LsfXHRYC0BySTptQ.gif" /><figcaption>The script changes the width of a path that is less than the specified width to it from the left edge</figcaption></figure><p>And if you’re really interested, don’t give up on learning. Be patient, and gradually you will accumulate scripting skills.</p><blockquote><em>But you didn’t ask what I like most about Illustrator, so I’ll tell you: Javascript. And I’m not a programmer. Nor even a good Javascripter.<br></em><a href="https://rwillustrator.blogspot.com/2006/02/illustrator-interview-james-talmage.html">Illustrator Interview: James Talmage</a>, 2006</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=263dbd515baa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>