Question
Using ExtendScript to loop through all of the items on a menu
I am trying to loop through all of the items in a FrameMaker menu with ExtendScript. I am using this code, but it only gets me the first command on the menu. Any help would be appreciated.
#target framemaker
var menu, item;
menu = app.GetNamedMenu ("!HelpMenu");
Console (menu.Label);
item = menu.FirstMenuItemInMenu;
while (item.ObjectValid () === 1) {
Console (item.Label);
item = item.NextMenuItemInMenu;
}

