You can try deleting the sumenu by index, e.g.
if your nameless submenu is the fourth menu. To make sure you use the correct index, display all names of the submenus of the main menu. Your nameless menu name should appear as two commas, as in
which shows that there is a nameless submenu between Object and Table, or submenu.
If that doesn't work you can always restart InDesign and remove the preferences (Ctrl+Alt+Del on Windows).
Thanks - that helped a lot!
first i used: alert(app.menus.item("$ID/Main").submenus.name)
to get the empty "name" and see which one is empty.
( where i manually increased the number by 1 each time... so i could be sure to get the right number - also didn't want to write a loop for this for the same reason. Also there are not that many Items..)
to remove it – Thanks a lot!
I know i could have reset my preferences but i wanted a better solution in case this happens again!
> didn't want to write a loop
No need for that. everyItem() is your second-best friend:
prints the names separated by a comma.
Yeah i guess i could have done that and then count starting from 0... but i pretty much hit it first try so no big deal.
Thanks for the information though - maybe i should make it my second-best friend
I also have some other problems i could not solve yet - but i wanted to see if i can do it myself before posting it here.