eeglab_execmenu#

eeglab_execmenu(label, function, parameters, *, session, extension_runtime=None)#

Run a menu-bound pop_* workflow with explicit parameters.

The menu label and function name must identify the same registered leaf in EEGPrep’s declarative menu tree. Only explicitly supported, noninteractive workflows are callable: this function never evaluates callback text or arbitrary history strings.

Parameters:
  • label (str) – Exact visible menu label, such as "Change sampling rate".

  • function (str) – Public function name present in that menu action.

  • parameters (Sequence[Any] | Mapping[str, Any] | None) – Positional arguments, EEGLAB-style key/value pairs, or a mapping of keyword arguments to append to the menu workflow.

  • session (EEGPrepSession) – Shared session to read and update.

  • extension_runtime (ExtensionRuntime | None) – Optional extension registry used while resolving the current menu tree.

Returns:

The replayable command appended to session.ALLCOM.

Raises:
  • ValueError – If the label and function do not identify one menu action.

  • NotImplementedError – If the resolved action has no safe noninteractive dispatcher.

Return type:

str