How to add custom menu in Photoshop?
Hello,
Is it possible to add a custom menu in Photoshop?
I'm using the following code as a startup script in InDesign, but it doesn't work for Photoshop:
(function(){
alert("Hello world 1");
var sma = app.scriptMenuActions.add("Create Photobook");
// Add an Event Listener
sma.addEventListener("onInvoke", function(){main()},false);
// Create a new menu item in the Help submenu
var mnu = app.menus.item("$ID/Main").submenus.item("$ID/&Help");
mnu.menuSeparators.add();
mnu.menuItems.add(sma);
})()
function main(){
alert("Hello world 2");
}
In InDesign, this shows the following, and "Hello world 2" is displayed when selected:

In Photoshop, "Hello world 1" displays as soon as Photoshop is launched (as expected), but the "Create Photobook" menu is missing. No error is thrown.
Thanks!
