Skip to content

Illustrator (Desktop) SDK/Scripting Issues

66 results found

  1. Document.save() for eps/svg/pdf documents changes them to ai files

    en_US

    Document.save() is a method to save over a document. In keyboard shortcut, it is equivalent to command+S.

    However, when ExtendScript's save() is executed on a document that preserves Illustrator editing capabilities such as eps/svg/pdf, it will be saved as an ai document instead of being overwritten as its original format.

    For example, when save() is executed for the document 1.eps, the file 1.ai will be created in the folder where the eps is placed. If the file 1.ai already exists, it will be overwritten with the contents of 1.eps and the original 1.ai will be lost.

    Environment

    • macOS…
    15 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  2. Broken embedICCProfile in export

    For TIFF, PSD exports, there are new ExportOptionsPhotoshop() and new ExportOptionsTIFF() in the ExtendScript object model, and a Boolean attribute embedICCProfile that embeds a color profile in exports. But if we set it to true, the profile still won't be embedded.

    I've explored versions of Adobe Illustrator. Illustrator CS6 - embedICCProfile property worked, but in the next version of CC (v17) embedICCProfile was broken and in the next versions it didn't change, it's been ten years!

    How to test:
    1) Rename exportTif.txt to exportTif.jsx and run it. The script will export the first artboard of the document in TIFF to…

    7 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  3. When getting ink.name, encoding gets broken for non-Latin languages: Chinese, Japanese, Russian, etc.

    A script cannot support Chinese, Japanese and other languages when getting ink.name, and it displays garbled characters.

    var doc = app.activeDocument;
    var inkList = doc.inkList;
    var inkUsage = [];

    for (var i = 0; i < inkList.length; i++) {
    var ink = inkList[i];
    var inkName = ink.name;
    inkUsage.push(inkName);
    }

    alert(inkUsage.join("\n"));
    $.write(inkUsage.join("\n"));

    This test script above gives a result like in the screenshot attached.

    Problem found by Aprking

    Original discussion:
    https://community.adobe.com/t5/illustrator-discussions/how-to-make-the-script-support-chinese-japanese-and-other-languages-when-getting-ink-name/m-p/14247791

    6 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  4. Bug: JavaScript unary operators "+" and "-" do not function as documented for UnitValue objects

    According to the Illustrator ExtendScript documentation, applying the unary operators "+" or "-" to a UnitValue object should respectively produce the numeric value or the negated numeric value of the UnitValue. However, they instead respectively produce the UnitValue unmodified or the UnitValue with its value negated.

    Either the documentation or the behaviour should be updated to reflect the other.

    I observed this behaviour in Illustrator 28.5 on Mac OS Sonoma.

    The behaviour may be quickly tested with the following script:

    var uv = new UnitValue(2, "px");
    alert(
    "Results:" +
    "\nUnitValue unmodified: \"" + uv + "\" (" + (typeof uv)…

    3 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  5. [BUG] exportFile() changes spaces to hyphens in file name

    //how to reproduce:
    app.activeDocument.exportFile(new File("~/desktop/test test"), ExportType.GIF);

    //types affected -  ExportType.PNG24,  .PNG8,  .JPEG, .GIF
    //types exporting with no unwanted hyphen - .TIFF, .SVG
    

    //persists on win and mac

    2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  6. Control the angle, length of gradients and other

    ExtendScript does not allow you to control the length, angle, or other parameters of gradients. These are all read-only attributes. Script authors can only work with color stops.

    For example, to rotate a gradient, we have to use the rotate() method, which has another problem. The angle of such a gradient is not copied to another object with the Eyedropper Tool: https://medium.com/@aiscripts/gradient-rotation-bug-24d7a6f6038f

    The fillColor assignment commands (selection[1].fillColor = selection[0].fillColor) carry over the base gradient, losing other properties. This reduces the ability to automate gradients via ExtendScript.

    Also ignores other Uservoices:
    1) https://illustrator.uservoice.com/forums/908050-illustrator-desktop-sdk-scripting-issues/suggestions/44461230-adjusting-one-gradient-causes-changes-to-unrelated
    2) https://illustrator.uservoice.com/forums/908050-illustrator-desktop-sdk-scripting-issues/suggestions/40296880-erroneous-fillcolor-type-one-shapes-with-freeform
    3) https://illustrator.uservoice.com/forums/333657-illustrator-desktop-feature-requests/suggestions/38435974-gradient-swatch-includes-angle-and-position-pleas

    5 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  7. Executing the script throws the Error 1242: Illegal argument

    平素は誠にお世話になっておりますAdobe製品の機能評価をしております
    Adobe製品の機能評価をしておりますが対応策があれば教えていただければ幸いです
    [Windows11 Pro 22H2] Adobe Illustrator27.9で次のJavaScriptを実行するとError 1242:Illegal argument -argument 1のエラーとなりましたのでバグとして報告いたします

    var textValue = null;
    var selectedFont = null;
    // アクティブなドキュメントを取得
    var doc = app.activeDocument;
    // インストールされている書体のリストを取得する関数
    function getInstalledFonts() {
    var fontList = [];
    var fonts = app.textFonts;
    for (var i = 0; i < fonts.length; i++) {
    fontList.push(fonts[i].name);
    }
    return fontList;
    }
    var fontAll = getInstalledFonts();
    // ダイアログボックスの作成
    var dialog = new Window("dialog", "縦組テキストを配置", undefined, {resizeable: true});
    dialog.orientation = "column";
    // ダイアログボックスに「テキスト入力エリア」を追加
    var textArea = dialog.add("edittext", undefined, "", {multiline:true, scrolling:true});
    textArea.preferredSize = [500, 200]; // 幅500、高さ200
    // ダイアログボックスに「書体の選択」の追加
    var fontDropdown = dialog.add("dropdownlist", undefined, fontAll, {scrolling:true}); // インストールされている書体のリストを取得
    fontDropdown.selection =…

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  8. 2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  9. Accessing Opacity Mask is impossible with scripting

    There is no way to work with the transparency mask in the Script SDK. This is the least of the problems. But when creating scripts to modify objects with masks, developers expect masks to be modified along with the parent object. After all, we see the "Linked to Art" icon in the Transparency panel.

    But what we have all these years as script developers: resize(), position, translate() modify the object, and its mask remains as it was.

    I've counted about 10 of my own scripts that use similar commands. I also have a large collection of other developers' scripts, where…

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  10. Vertically alignChildren in ScriptUI does not align properly

    In the ScriptUI documentation, there is an alignChildren attribute: "Tells the layout manager how to align children of this container that are not of the same size in a column or row". The issue of vertical alignment of UI objects in the scripts dialog box persists from version to version of Illustrator.

    As we can see in the image, only the top alignment seems to be correct. The center alignment is shifted up, and the bottom alignment does not reach the bottom. At the same time, native UI dialogs contain the correct alignment. Thus script interfaces always look less professional.

    3 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  11. app.selectTool('Adobe Intertwine Zone Marker Tool') does not work

    When I run the following script, the Adobe Intertwine Zone Marker Tool starts up and I can select the area where I want to change the overlap like the lasso tool. However, nothing happens after the selection.

    app.selectTool('Adobe Intertwine Zone Marker Tool')
    

    Expected Result

    The overlap of the selected area is changed.

    Actual Result

    The line will remain as if it was drawn with the lasso tool. The overlap is not changed.

    Enviroment

    • macOS 11.7
    • Illustrator 27.1.1
    6 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    An intended way of picking up the hidden Zone Marker tool via a script is to enter the Intertwine mode using these commands:

    app.executeMenuCommand('Partial Rearrange Make') — when an intertwine object is not created yet, and

    app.executeMenuCommand('Partial Rearrange Edit') — when the object already exists, as per comments by the OP.

  12. [Typo] Document.rearrangeArtboards() of Illustrator JavaScript Reference.pdf

    There is a typo in rearrangeArtboards in Illustrator JavaScript Scripting Reference.pdf. It cannot execute as per the document. Please correct it.

    I have checked and it was wrong from CS5 to current version (2022 v2 - Feb 2022).

    Expected Name:

    rearrangeArtboards

    Actual Name:

    rearrangeArboards ("t" is missing from Artboards)

    8 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  13. 51 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  14. Drag-and-drop bug running scripts containing app.doScript()

    Watch the "drag-and-drop-bug.mp4" video, which demonstrates a specific but with the Adobe Illustrator's JS engine handling scripts which are dragged to different areas of the screen in different ways.

    In most cases, a drag-and-dropped script will work as intended. But for 10 years in CS6-CC 2023 versions there is a limited bug handling the script if dragged to the “wrong” area of the program window.

    If the script contains an action and a user drags it onto the document window, it may not work correctly. If the script selects objects one by one and applies an action to them, it…

    10 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  15. Illustrator 2022 (26.5.0) listStyle scripting issues

    Starting with Illustrator 2022 (26.4.1), the ability to create bulleted and numbered lists has been implemented. Text to which lists are applied can be obtained in ExtendScript or AppleScript by using the listStyle property.

    However, normal text that is not bulleted and numbered lists (hereinafter called "normal text") has no listStyle assigned to it, and referencing it causes an error. The following problem occurs.

    Issue 1: ExtendScript and AppleScript cannot directly change lists to normal text

    Expected state

    For example, the following script (ExtendScript) can change a paragraph to normal text.

    var doc = app.documents[0] ;
    var targetParagraph = doc.selection[0].paragraphs[0]
    11 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  16. settings raster effects value visible main screen

    I need to view somewhere in the Illustrator interface, the value set in the "raster effects settings" panel.

    Is there a scripted way to implement this?

    I've created actions that set this value to 72ppi / 300ppi so that I can change it when the document becomes heavy and unmanageable (thanks to using only 1 CPU CORE, thanks Adobe ❤).
    The problem is that if I save the file, I will probably save it at 72ppi, but for printing the effects are poor and you have to set them to 300ppi.
    So having the value always visible on the screen,…

    2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  17. exportFile doesn't work with NoUI document

    trying to create a "NoUI" document and export as SVG like this:

    opendoc = app.documents.addDocumentNoUI();
    opendoc.exportFile(file, ExportType.SVG);

    I get the attached error in AI

    I can't think of any other way to export an SVG via script. Obviously there are scripting things that don't work with NoUI documents, but it seems like this one should. Am I doing something wrong?

    2 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  18. [Typo] ExportOptionsTIFF.IZWCompression of Illustrator JavaScript Reference.pdf

    There is a typo in ExportOptionsTIFF in Illustrator JavaScript Scripting Reference.pdf, which fails to specify whether or not LZW compression is used. Please correct it.

    I have checked and it was wrong from the CS6 version.

    Expected Name: lZWCompression (begins with a lowercase L)
    Actual Name: IZWCompression (begins with an uppercase i)

    The function name in the example is also wrong. exportFileToTIFF should be correct.

    Exporting to TIFF format
    
    // Exports current document to dest as a TIFF file with specified
    // options, dest contains the full path including the file name
    
    function exportFileToPSD (dest) { // <-- exportFileToTIFF
      if
    11 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  19. how can i call these functions in AI via script?

    -I would like to open a Multipage PDF with settings set to open "all pages" and "import pages as links".
    If the pdf has only one page import it also as a link (if possible do it)

    • Import an Illustrator *.ai file Multi-layouts by importing them as links across multiple layouts.

    • Set flattener presets:

    • preset name

    • various parameters...

    • Select all (Select / All)

    • Run the command: Object / convert transparency / Previously saved preset / OK

    • I saw among the commands that there is an openOptionsFreeHand could I create a script that opens the freehand files for me?

    How could…

    1 vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    0 comments  ·  JavaScripting  ·  Admin →
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
  20. Unexpected reset of selected swatches

    app.activeDocument.swatches.getSelected() gets selected swatches in the document. If you select one path in a document and apply any selected color to it, the swatches will remain selected. But if many paths are selected, applying a swatch to any path resets the selected swatches.

    The user has to manually select the swatches again each time he runs the scripts.

    15 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
← Previous 1 3 4
  • Don't see your idea?

Illustrator (Desktop) SDK/Scripting Issues

Categories

Feedback and Knowledge Base