Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
5

executeMenuCommand() Command List

Community Expert ,
Aug 12, 2022 Aug 12, 2022

While building Ai Command Palette I found a great list of executeMenuCommand() values extracted by Shalako Lee from the 2017 SDK. As you might imagine, some of those commands no longer work, and since I'm about to release v0.2.0 of Ai Command Palette I've been testing them all and keeping track of the results in this Google Sheet.

 

I'm sharing this here because I figured this might be useful to some of you who write scripts for Illustrator. The sheet includes the Original List of commands from Shalako and a working list of the commands that I'm testing in Ai v26.3.1.

 

Right now I'm about halfway through the original 506 commands from Shalako's list. So far, I've found about 90 that no longer work. I've also updated any verbiage that may have changed in the menu system (since 2017) and updated the ordering to match Ai v26.3.1.

 

I also, made a simple script to test the commands below if you want to test any yourself. I'm trying to test each command in context to ensure they are working correctly.

 

Let me know if you have any other that I may have missed... Cheers!

 

P.S. There is another list on this forum (posted in 2014) that I have yet to review but I am aware of it and plan to compare it with Shalako's.

 

 

 

var result = prompt("Enter Command To Test", "", "Test Built-In Commands");

try {
  app.executeMenuCommand(result);
} catch (e) {
  alert("Error executing command:\n" + result + "\n\n" + e);
}

 

 

 

This browser version is no longer supported. Please upgrade to a supported browser.
TOPICS
Scripting
33.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 4 Correct answers

Guide , Aug 12, 2022 Aug 12, 2022

You may be interested in this 

 

I've found Ten A's list to be the most complete: 

https://ten-artai.com/illustrator-ccver-22-menu-commands-list 

Translate
Enthusiast , Aug 12, 2022 Aug 12, 2022

I also maintain a menuCommandString database, so I will introduce it. It is Illustrator 2022 (26.4.1) equivalent and is made of Notion. There are currently 530 commands in this database.

Illustrator Reference/ExtendScript/app.executeMenuCommand | Notion

Translate
Explorer , Aug 15, 2022 Aug 15, 2022

There are my files for:

  • com reg keys,
  • .aia and .kys key codes,
  • app.executeMenuCommand('command'), 
  • app.selectTool('command'),
  • and parm error

https://github.com/krasnovpro/taptapkey/tree/main/adobe/illustrator/dicts

Translate
Enthusiast , Oct 14, 2024 Oct 14, 2024

Found new commands in Illustrator v29.0.

menu

key

note

Object > Objects on Path > Attach

Attach Objects on Path

Added from v29.0

Object > Objects on Path > Options

Options Objects on Path

Added from v29.0

Object > Objects on Path > Expand

Expand Objects on Path

Added from v29.0

Window > Type > Reflow Viewer

ReflowWindowMenu

Added from v29.0. East asian feature

 

And a tool.

tool

key

note

Objects on Path

Adobe Constraints Tool

Added from

...
Translate
Adobe
Enthusiast ,
Oct 28, 2025 Oct 28, 2025

Found new commands in Illustrator v30.0.

menu

key

note

Object > Generative > Generate Vectors...

GenAIConsolidatedGenerateVectors

Changed from 'Generate Modal File Menu ' at v30.0

Object > Generative > Gen Shape Fill...

GenAIConsolidatedShapeFill

Changed from 'Shape Fill Object Menu' at v30.0

Object > Generative > Print Bleed

GenAIConsolidatedBleed

Changed from 'Gen Bleed Object Menu' at v30.0

Object > Generative > Generative Recolor

GenAIConsolidatedRecolor

Added from v30.0

Object > Generative > Generate Patterns

GenAIConsolidatedPatterns

Changed from 'Adobe Generative Patterns Panel' at v30.0

Object > Generative > Generation History

GenAIConsolidatedVariations

Changed from 'Generate' at v30.0

Object > Artboards > Switch Orientation

Switch Orientation

Added from v30.0

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 28, 2025 Dec 28, 2025

Found new commands. The menuCommandString for “Other Text” and “Other Misc” and so on, which were previously unsupported, is now enabled. Surprising.

 

Based on my investigation, it appears available starting with Illustrator 2025 (29.4).

 

menu

key

note

File > Close All

closeAll

Added from v29.4

Type > Insert Special Character > Symbols > Bullet

~bullet

Added from v29.4

Type > Insert Special Character > Symbols > Copyright Symbol

~copyright

Added from v29.4

Type > Insert Special Character > Symbols > Ellipsis

~ellipsis

Added from v29.4

Type > Insert Special Character > Symbols > Paragraph Symbol

~paragraphSymbol

Added from v29.4

Type > Insert Special Character > Symbols > Registered Trademark Symbol

~registeredTrademark

Added from v29.4

Type > Insert Special Character > Symbols > Section Symbol

~sectionSymbol

Added from v29.4

Type > Insert Special Character > Symbols > Trademark Symbol

~trademarkSymbol

Added from v29.4

Type > Insert Special Character > Hyphens And Dashes > Em Dash

~emDash

Added from v29.4

Type > Insert Special Character > Hyphens And Dashes > En Dash

~enDash

Added from v29.4

Type > Insert Special Character > Hyphens And Dashes > Discretionary Hyphen

~discretionaryHyphen

Added from v29.4

Type > Insert Special Character > Quotation Marks > Double Left Quotation Marks

~doubleLeftQuote

Added from v29.4

Type > Insert Special Character > Quotation Marks > Double Right Quotation Marks

~doubleRightQuote

Added from v29.4

Type > Insert Special Character > Quotation Marks > Single Left Quotation Marks

~singleLeftQuote

Added from v29.4

Type > Insert Special Character > Quotation Marks > Single Right Quotation Marks

~singleRightQuote

Added from v29.4

Type > Insert WhiteSpace Character > Em Space

~emSpace

Added from v29.4

Type > Insert WhiteSpace Character > En Space

~enSpace

Added from v29.4

Type > Insert WhiteSpace Character > Hair Space

~hairSpace

Added from v29.4

Type > Insert WhiteSpace Character > Thin Space

~thinSpace

Added from v29.4

Type > Insert Break Character > Forced Line Break

~forcedLineBreak

Added from v29.4

Other Text > Point Size Up

faceSizeUp

Added from v29.4

Other Text > Point Size Down

faceSizeDown

Added from v29.4

Other Text > Font Size Step Up

sizeStepUp

Added from v29.4

Other Text > Font Size Step Down

sizeStepDown

Added from v29.4

Other Text > Kern Looser

~kernFurther

Added from v29.4

Other Text > Kern Tighter

~kernCloser

Added from v29.4

Other Text > Tracking

tracking

Added from v29.4

Other Text > Clear Tracking

clearTrack

Added from v29.4

Other Text > Spacing

spacing

Added from v29.4

Other Text > Uniform Type

clearTypeScale

Added from v29.4

Other Text > Highlight Font

highlightFont

Added from v29.4

Other Text > Highlight Font (Secondary)

highlightFont2

Added from v29.4

Other Text > Left Align Text

leftAlign

Added from v29.4

Other Text > Center Text

centerAlign

Added from v29.4

Other Text > Right Align Text

rightAlign

Added from v29.4

Other Text > Justify Text Left

justify

Added from v29.4

Other Text > Justify Text Center

justifyCenter

Added from v29.4

Other Text > Justify Text Right

justifyRight

Added from v29.4

Other Text > Justify All Lines

justifyAll

Added from v29.4

Other Text > Toggle Auto Hyphenation

toggleAutoHyphen

Added from v29.4

Other Text > Toggle Line Composer

toggleLineComposer

Added from v29.4

Other Text > Subscript

~subscript

Added from v29.4

Other Text > Superscript

~superScript

Added from v29.4

Other Text > Bold

~textBold

Added from v29.4

Other Text > Italic

~textItalic

Added from v29.4

Other Text > Underline

~textUnderline

Added from v29.4

Other Object > Lock Others

lock2

Added from v29.4

Other Object > Hide Others

hide2

Added from v29.4

Other Object > Repeat Pathfinder

repeatPathfinder

Added from v29.4

Other Object > Average & Join

avgAndJoin

Added from v29.4

Other Object > Isolate Selected Object

enterFocus

Added from v29.4

Other Object > Exit Isolation Mode

exitFocus

Added from v29.4

Other Misc > Switch Units

switchSelTool

Added from v29.4

Other Misc > New File (No Dialog)

new2

Added from v29.4

Other Misc > Help (Secondary)

helpcontent2

Added from v29.4

Other Misc > Undo (Secondary)

undo2

Added from v29.4

Other Misc > Cut (Secondary)

cut2

Added from v29.4

Other Misc > Copy (Secondary)

copy2

Added from v29.4

Other Misc > Paste (Secondary)

paste2

Added from v29.4

Other Misc > Zoom In (Secondary)

zoomin2

Added from v29.4

Other Misc > Navigate to Next Document

navigateToNextDocument

Added from v29.4

Other Misc > Navigate to Previous Document

navigateToPreviousDocument

Added from v29.4

Other Misc > Navigate to Next Document Group

navigateToNextDocumentGroup

Added from v29.4

Other Misc > Navigate to Previous Document Group

navigateToPreviousDocumentGroup

Added from v29.4

Other Misc > Subscript (Secondary)

~subscript2

Added from v29.4

Other Misc > Superscript (Secondary)

~superScript2

Added from v29.4

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 28, 2025 Dec 28, 2025

Awesome! thanks for sharing

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 29, 2025 Dec 29, 2025

Wow, great work! I'll get these all added to AiCommandPalette. Thanks as always for sharing and putting in the work to extract all of these!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 30, 2025 Dec 30, 2025
LATEST

Looks like they fixed PARM error: https://github.com/krasnovpro/taptapkey/blob/main/adobe/illustrator/dicts/menus.yaml#L1524

 

They only fixed app.executeMenuCommand(), but app.selectTool('Adobe Blend Mode Darken') also crashes.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 12, 2022 Aug 12, 2022

Awe inspiring, that's what I'm looking for.👍👍

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 15, 2022 Aug 15, 2022

There are my files for:

  • com reg keys,
  • .aia and .kys key codes,
  • app.executeMenuCommand('command'), 
  • app.selectTool('command'),
  • and parm error

https://github.com/krasnovpro/taptapkey/tree/main/adobe/illustrator/dicts

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 15, 2022 Aug 15, 2022

Another great list! I went through all of yours and added the ones I didn't have. Thanks so much!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 16, 2022 Aug 16, 2022

I was not aware of the "app.selectTool()" command! Thank you.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 22, 2022 Oct 22, 2022

Command has been updated to AI 2023.

 

Also, maybe someone will need a list of aliases – commands from the kys file and their counterparts for executeMenuCommand, it includes in menus.yaml

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 22, 2022 Oct 22, 2022

thanks for the update!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 24, 2022 Oct 24, 2022

Also commands change log includes in menus.yaml

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 24, 2022 Oct 24, 2022

Yeah, so I built a new spreadsheet for my latest version of Ai Command Palette which you can see here. It has the min and max versions for menu and tool commands that I was last aware of. I plan to go through your list and add them there as well. It has a bunch of other stuff, including the localization for DE and RU. This python script I created ingests these spreadsheets (as CSV's) and creates JavaScript objects very similar to your last post (see below).

 

Ai Command Palette uses this to know which menu commands and tools should be available for each user depending on their system. It would be great if we could all work together to try and complete this list as much as possible. I did a bunch of testing for the last version and plan to do the same for this one when I have time.

 

// generated localized commands data object
{
  tool: {
    "tool_Adobe Add Anchor Point Tool": {
      action: "Adobe Add Anchor Point Tool",
      type: "tool",
      minVersion: 24,
      maxVersion: null,
      loc: {
        en: "Add Anchor Point Tool",
        de: "Ankerpunkt-hinzufügen-Werkzeug",
        ru: "Добавить опорную точку Инструмент",
      },
    },
  },
  // ...
}

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 25, 2022 Oct 25, 2022

@krasnovpro, I went through your updated lists and got everything I didn't have added to my spreadsheet. Ai Command Palette is updated with these in v0.4.1 too. Thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 28, 2024 Jun 28, 2024

The app.selectTool command for AstuteGraphicsPlugins doesn't seem to work. When I tested it, it caused Adobe Illustrator 2024 to crash. I used the command from your tool.txt file: app.selectTool('AG Dynamic Shapes');`, but it didn't work even though the plugin is installed. Could there be an error in the documentation?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 30, 2024 Jun 30, 2024

Correct code:

app.selectTool('Dynamic Shapes Tool');

Read the file more carefully.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 30, 2024 Jun 30, 2024

Where did you find these tool names, I have another aip plugin but I don't know the tool names for it!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 01, 2024 Jul 01, 2024

Go to Edit → Keyboard Shortcuts.

Bind your tool to the 0 (zero key).

Save set with name test.

Run Notepad and open this file:

%AppData%\Adobe\Adobe Illustrator 28 Settings\en_US\x64\test.kys

(fix the path if you have a different version or locale).

Find all occurrences of /Key 48.

One of them will look something like this:

	/Snap\ To\ Collisions\ Tool {
		/Context 0
		/Modifiers 0
		/Represent 48
		/Key 48
	}

Remove the leading slash and all backslashes, and you get the command name.

In this example, it's Snap To Collisions Tool.

Now you can use it with app.selectTool.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 12, 2025 Nov 12, 2025

this is great, but how do I go about using the tool functions? (e.g: Adobe Tool Dec Diameter, Adobe Swap Fill Stroke...) ??? been trying for the whole day 😞

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 12, 2025 Nov 12, 2025

So to activate/select a tool (as you would with the mouse) you call the `selectTool()` method like:

app.selectTool("Adobe Arc Tool")

 ...but the two items you listed are not built-in AI tools that I am aware of (link to a list of tools I have tested) so they may be from plug-in I don't have installed.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 12, 2025 Nov 12, 2025

fair enough. I found them in the "tools.yaml" file maintained by @krasnovpro . last update yesterday. so I thought maybe they now work somehow with selectTool or can be injected into the tool somehow in new illustrator. I updated and tried everything in power but no success.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 12, 2025 Nov 12, 2025

Ah, I see his list... So "Adobe Tool Dec Diameter" is listed under "# tool functions (not tools)" and "Adobe Swap Fill Stroke" is not a "tool" per se. Both of those items are also listed under his bugs section with the note "# The commands below produces =PARM= error and may cause a crash". Sorry!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 12, 2025 Nov 12, 2025

Tool functions are not accessible from app.selectTool, they cause a PARM error, just like some menu functions, and can also crash Illustrator. This behavior is described at the end of the tools.yaml. To fix this, contact Adobe programmers. As workaround you can record the tool function into an action and invoke it through app.doScript.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 15, 2022 Aug 15, 2022

awesome work, thanks to all that contributed to put the list together.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Aug 15, 2022 Aug 15, 2022

So many great resources here. Thanks to everyone for contributing and compiling these lists and even testing them in different versions.

 

On the topic of menu commands, my biggest gripe has always been the naming convention of the commands. In many cases, the argument required for app.executeMenuCommand() is cryptic, nonsensical, or not at all descriptive of what the command does. Additionally, the variable naming convention makes it very difficult to remember how to format the argument for the command you need. And incorrectly formatting your menu command argument brings about the dreaded MRAP/PARM. 

 

Would there be any interest in, or do you think you might use some kind of framework for app.executeMenuCommand() allowing the freedom to effectively namespace "app.executeMenuCommand" with a custom function name (personally, id choose emc("commandName"); but any user could choose whatever function name they want. Then within the function, the custom arguments are assigned to the appropriate argument for executeMenuCommand(). Errant arguments could also be handled more gracefully and with more useful info than a generic mrap.

 

This also gives freedom to the user to customize their command/argument pairs to best suit their workflow. As an example, to select all same fill colors, the default argument is "Find Fill Color menu item" in a frustrating variable letter case scheme.. I'd like to call that command with emc("sameFill"); so in my emc() function, i'd assign "sameFill" to "Find Fill Color menu item", then input the appropriate argument into executeMenuCommand();

 

It would also be possible to include custom logic before/after the actual menu command for certain commands. As an example, the live pathfinder effects often need to be expanded. But not always. emc() could accept another argument for enabling or disabling the paired functionality, or even just passing it in as one of the parameters. perhaps an object literal for feeding custom params to different functions.

 

You could also bind multiple menu commands together for common tasks, all while keeping your main code nice and tidy (a big priority of mine after many years of writing disgusting spaghetti code) with menu command arguments that make sense to YOU and are customizable for your own workflow.

 

If optimization is desired.. I.E, not including a giant function with 500+ commands to every script just so you can use one or two.. The commands could be split into smaller chunks by category like "File", "Edit", etc. Or even compact custom sets for production that only include the commands your code actually uses.

 

What do you guys think? I know extendscript/scripting-as-we-know-it is dying anyway and transitioning to UXP.. But I think this would be a pretty straightforward build that could still be useful in the interim.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines