In order to facilitate Keyboard Maestro (Macros) I was able to get a listing of scripts in the menubar so I can assign key commands to them.
(Dealing with Contextual Menus and Shortcuts is a load of un-predictable voodoo.)
scripts = config.setting["list_of_scripts"] menu = self.menuBar().addMenu(_("&Functions")) menu.addSeparator() menu.addMenu(ScriptsMenu(scripts, _("&Run scripts"), menu)) menu.addMenu(QtWidgets.QMenu(_("P&lugins"), menu)) menu.addAction(self.album_search_action) menu.addSeparator()
This functionality isn’t perfect, the menu items are not updated if new scripts are added, or script contents changed, until Picard is re-launched.
I can’t come up with a similar way of getting a list of plugins though I’d like to have those too.
** These mods are not foolproof, there is no checking for eligibility (can that function be used with the current selection). Making an improper selection will crash Picard until proper checking is added.
Also menu items are not updated if new scripts are added, or script contents changed, until Picard is re-launched. Again, experimental at this point.