Skip to content

Illustrator (Desktop) SDK/Scripting Issues

61 results found

  1. Export jpg using script to specific dpi

    Export jpeg using script to specific dpi.

    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)
  2. [BUG] Error during evaluation of conditional (ternary) operator

    The script in the Illustrator produces an error during evaluation of a conditional expression that includes a nested conditional expression without parenthesis.

    This breaks JavaScript optimization tools e.g. Google Closure Compiler.

    Scenario:
    alert(true ? true ? 1 : 2 : 3);

    Expected:
    Standard dialog with message: "1".

    Actual:
    Dialog with message "Error 25: Expected: :."

    Workaround:
    alert(true ? (true ? 1 : 2) : 3);

    System info:
    Illustrator Version: 23.0.1
    OS: OS X
    Version: 10.14
    System Architecture: x64

    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)
  3. Add Javascript API for swatches functionalities

    There are many missing feature that we can not handle using javascript scripting, also may be apple script.

    1. Merge swatches via script
    2. Suppress merge swatch conflict dialog via script or do it in the background by default value.
    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)
  4. Javascript erroneously reports stroke color in paragraphStyles.characterAttributes if it has been changed from a color to noColor

    AI 21.0.0 2017 Release

    ---------------------------------------- to reproduce

    New Document (defaults: print, letter)

    T for text tool, click in document, type "test text"

    cmd-return to exit

    in Color palette click anywhere in color bar to change text color

    in Paragraph Styles palette, click the new style icon to create "Paragraph Style 1"

    ---------------------------------------- 1st run

    run script "bugreport"

    results:
    fillColor: [CMYKColor]
    strokeColor: [NoColor]

    ---------------------------------------- 2nd run

    select the "test text" text

    press "X" to change the color palette from fill to stroke

    click anywhere in the color bar to give the text a colored stroke

    in Paragraph Styles palette, select "Redefine…

    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. 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. 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.

    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)
  7. 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)
  8. 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)
  9. .duplicate() does not update selection, crashing Illustrator

    selection[0].duplicate()
    // redraw()
    alert(selection.length)

    when running this script in Illustrator, you will see that both the original selection plus its duplicate will be selected, but the alert will display 1. Running this script in debug shows that selection only contains one object despite .duplicate() being used. This causes a corruption(?) issue where in reality there are now two objects selected but selection only shows one to be selected unless you do redraw(). This discrepancy will cause Illustrator to crash when trying to set the selection (in specific circumstances) on another line after the .duplicate().

    In other situations, whether one or…

    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)
  10. placedItem name property doesn't work

    Hello,

    I'm trying to get placedItem name, but it is empty

    //Get active document
    var activeDocument = app.activeDocument;

    //Get all links (or placed items)
    for (var i = 0; i < activeDocument.placedItems.length; i++) {
    var imageName = activeDocument.placedItems[i].name;
    alert("imageName = " + imageName);
    }

    activeDocument.placedItems[i].name returns empty string

    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)
  11. Unable to create file or folder object in Illustrator CC2020

    I tried to create a file or folder object with a slash (colon) in its name in Illustrator CC2020, but I couldn't.
    Also, I was not able to get the file object from PlacedItem.
    The same thing happens with AppleScript.

    In Photoshop CC2020 and InDesign CC2020,I was able to create.

    NG Case(JSX)

    [File location] desktop > 2020/01 > 01/01Image01.jpg ==> [Full path] /Users/***/desktop/2020:01/01:01Image.jpg

    var fObj = File('/Users/***/desktop/2020:01/01:01_Image.jpg'); ==> invalid object
    fObj.exists ==> false
    fObj.name ==> none

    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)
  12. retrieve transformation matrix of a symbol instance

    there seems to be no way to retrieve a symbol instance's transformation matrix (neither javascript nor SDK).
    It is only possible to compare the bounding box to the expected one

    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)
  13. CC2019 CoordinatePrecision2 in Preferences

    When doing operations on small vector objects I found that the precision was weird.

    After checking the Preferences files I found that the key
    plugin/SVGFormat/CoordinatePrecision was set to 3 (like in CC2018 were it works fine)

    But also found a new key:
    plugin/SVGFormat/CoordinatePrecision2 set to 1!

    After closing Illustrator and updating that value to 3 it works again.

    I didn't see any mention of that change in any docs.

    Is "CoordinatePrecision2" the new value from CC2019? and "CoordinatePrecision" deprecated?

    Thanks!

    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)
  14. Can you provide a script that will take selected elements and groups and place them on their own layers?

    Can you provide a script that will take selected elements and groups and place them on their own layers?

    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)
  15. 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)
  16. 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)
  17. variables.removeAll(); does not work

    When I execute variables.removeAll();. error occurred: 1346458189 ('PARM').
    On the other hand, dataSets.removeAll() works.

    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

    1 comment  ·  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)
  18. ExtendScript Debugger 2.0.3 for VSCode fails on "doScript" method

    When a script containing "doScript" method is run from VSCode to AI 2022 using any version of ExtendScript Debugger 2.x it locks up Ai 2022 requiring a force quit. VSCode must also be reloaded before any debugging can continue.

    Rolling ExtendScript Debugger back to v1.1.2 eliminates the failure at the expense of the more advanced features of v2.x.

    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)
  19. exportForScreens() file output naming issues

    Natively File > Export > Export for Screens has an option to add a suffix to the output file name, but in scripting the last parameter adds a prefix to the output file name not a suffix as it should to match the desk top user options.

    exportForScreens(path, ExportForScreensType, ExportForScreensOptions, ExportForScreensItemToExport, "This adds a prefix NOT a suffix");

    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. Listbox checkmarks not displaying in Illustrator 2020

    Checkmarks are no longer being displayed on listbox items in Illustrator 2020. Please see the attached image showing the listbox in Illustrator CC 2019 and Illustrator 2020. This is on a Windows PC.

    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)
  • Don't see your idea?

Illustrator (Desktop) SDK/Scripting Issues

Categories

Feedback and Knowledge Base