Skip to main content
jduncan
Community Expert
Community Expert
August 12, 2022
Answered

executeMenuCommand() Command List

  • August 12, 2022
  • 10 replies
  • 29157 views

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);
}

 

 

 

Correct answer sttk3

thanks sttk3!


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

10 replies

Participant
June 9, 2025

Greetings all!
I would like to know how to set specific numbers in dialog boxes that pop-up.
For example using offset path with "app.executeMenuCommand('OffsetPath v23');" and setting the Offset to either 2mm or -2mm with Miter joins and 4 Miter limit. 

Is that possible?

krasnovpro
Participating Frequently
June 9, 2025

Windows — autohotkey, macos — hammerspoon.

schroef
Inspiring
February 13, 2024

Nice, i jsut noticed that some columns are hidden For instance the English column

jduncan
Community Expert
jduncanCommunity ExpertAuthor
Community Expert
February 13, 2024

Hmm, I'm not sure why they were hidden. There were some columns also missing for additional languages. The linked Google Sheet pulls from another Google Sheet where I track more stuff for one of my projects and I had an error in the importrange formula. Cheers!

schroef
Inspiring
February 14, 2024

Is that perhaps why your palette does not "show all menu commands" as in one of your videos. If i search for it, it doesnt appear. If i go into the preferences, the initial menu item which shows, it doesnt show neither

Known Participant
January 27, 2024

Thank you so much for all your work!

Disposition_Dev
Legend
August 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.

Sergey Osokin
Inspiring
August 16, 2022

Small emc() chunks can be manually written for the current task. I haven't seen any scripts that use a lot of different app.executeMenuCommand().

 

ES will not die as long as there are users of old versions of Illustrator. And there are a lot of them, because Adobe updates are unpredictable, break paid plugins and user workflow.

CarlosCanto
Community Expert
Community Expert
August 15, 2022

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

krasnovpro
Participating Frequently
August 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://www.dropbox.com/scl/fo/s4l5wbsq93rbg2m514p5l/AEEwxFH69csBsq1yVxcSWNE?rlkey=4i1yaw1m587pr8knf7el09pey&dl=0

jduncan
Community Expert
jduncanCommunity ExpertAuthor
Community Expert
August 15, 2022

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

Inspiring
August 13, 2022

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

Legend
August 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

jduncan
Community Expert
jduncanCommunity ExpertAuthor
Community Expert
August 12, 2022

This is great! Seems you have about 75 that I haven't found anywhere else. I'll go through them all and get them added. Thanks so much!

Legend
August 12, 2022

Remarks:

 

  • Includes both old and new menu items that have been renamed. There are duplicates
  • The last part of the Photoshop effect is 4 characters long. If it is short, fill in the spaces (e.g. 'Live PSAdapter_plugin_Ct  ')
  • There was confusion in the specification with both the properties panel and version history being the empty string ''. It seems that they changed to 'Adobe Property Palette' and 'Adobe Version History File Menu Item' at some point
femkeblanco
Legend
August 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 

Inspiring
January 8, 2025

Fantastic! Thank you.

I continue to be amazed by Adobe's lazyness in providing such references.

In case you are curious - this is all I wanted to automate - then this script be called from more complicated scripts ....

    app.executeMenuCommand("selectall");
    app.executeMenuCommand("Horizontal Align Center");
    app.executeMenuCommand("Vertical Align Center");

ChatGPT & Gemini failed miserably.

CoPilot was on the right track but the align commands were wrong. 

Your forum comment saved my sanity. Thx again.

rcraighead
Legend
August 12, 2022

Awesome! Thanks for sharing this.