Skip to main content

4 replies

Peter Kahrel
Community Expert
Community Expert
May 11, 2026

@Mike Witherell -- Here’s a script that shows you all the menu actions (on your computer), names and IDs.You can sort and filter in various ways.

https://creativepro.com/files/kahrel/indesign/menu_actions.html

Mike Witherell
Community Expert
Community Expert
May 11, 2026

Hi Peter,

Yet another handy resource. Thank you so much. Nice to see you are still editing it in 2026. I think ultimately, what I would like to do with these menuIDs is to make a script that walks me through all the openable dialog boxes so that I can turn on the Preview Switch (a big wishlist item with me). This menuID info will be a factor in developing such a script.

Mike Witherell
Mike Witherell
Community Expert
Community Expert
May 11, 2026

Hi again, Rob,

I tried your script and got over 5,000 items (including my recent files list and my scripts, and other customizations).

I’m wondering what version to re-publish on my website. For the last couple of years, I have been hosting reference pieces that are either vanishing or are hard to find. When is saw this one referenced in another recent post, I thought I would learn more about it with the possibility of preserving it as another InDesign free resource.

Mike Witherell
rob day
Community Expert
Community Expert
May 11, 2026

Generally it is probably safer to use itemByName or item referencing an ID string, but in any case you need to check with an if statement—for example checking if itemByName is valid and enabled:

 

var ma = app.menuActions.itemByName("Go to Page...");
if(ma.isValid && ma.enabled){
ma.invoke();
} else {
alert("Menu Item is not available")
}

or item:

app.menuActions.item("$ID/Layout/Go to Page...")

 

Mike Witherell
Community Expert
Community Expert
May 11, 2026

Thank you Rob. The aging link to this CS5 resource specifies about 2000 items. I will try your script and report back.

Mike Witherell
rob day
Community Expert
Community Expert
May 11, 2026

Hi ​@Mike Witherell , You can script a list, which will vary somewhat for different users and versions—my list is 4383 items, (which includes my #387 7600PrimaryInks.indd from my Open Recent menu). This will output your list with ID and name to your desktop—my text file is attached:

 

var ma = app.menuActions.everyItem().getElements()
var sl = "ID\tName\n"
//alert(s)
for (var i = 0; i < ma.length; i++){
sl+= "\n" + ma[i].id + "\t" + ma[i].name
};
//$.writeln(ma.length)
writeText("~/Desktop/menuactions.txt",sl)

/**
* Write a text file
* @ param the file path
* @ param the text
*
*/
function writeText(p,s){
var file = new File(p);
file.encoding = 'UTF-8';
file.open('w');
file.write(s);
file.close();
}