Are Nested Menu Items Available?

On a previous post someone kindly showed a function to run a menu item.
Whay I have found is that this doesnt appear to work for Nested Menu items because the menu item is different on different computers which I find strange.

I am trying to open the Gaussian Blur Dialog which on my Mac has an id of -356 but on a different computer it shows a different id value.

Am I missing something

function menuCommand(id) {
      commandID: id,
      kcanDispatchWhileModal: true,
      _isCommand: false

menuCommand( // put menu id here);

You might want to try this, without the use of nested menus, the Gaussian Blur dialog menu pops up. Hope this is what you want.

const batchPlay = require("photoshop").action.batchPlay;

await batchPlay(
      "_obj": "gaussianBlur",
      "radius": {
         "_unit": "pixelsUnit",
         "_value": 30
      "_isCommand": true,
      "_options": {
         "dialogOptions": "display"
   "synchronousExecution": false,
   "modalBehavior": "fail"

@Pierre_G thats worked fine on my Mac, just going to load Windows and test it.

May I ask how you found this, ive been trying for hours


I just used Alchemist in Listening mode, and went to Ps menu for Gaussian Blur on a raster layer, that’s it.

Well blow me down as we say here in the UK.
I was looking in the wrong place trying hunt down a menu id to use in the above code.

Thank you so much.

I hear you :slight_smile: Glad it helps!


It seems that the menu ids will change after a new version is installed.

In one version it opens the Liquify, in the next it will open Dry Brush…

That is not a good new.

I think I know what I’m doing today after work :sweat_smile:

Yesterday I got the confirmation.

if you have a menu id that is using a “-” befor the number it is not a static one and will change on each release and may be different from a windows to a mac client.

The promise is that the programmer-team has this problem on the roadmap but when this might be no problem any more no one can say…

1 Like