Add to menu...

A command in the File menu of a ScriptEditor that was created in an editor (e.g. SoundEditor) window.

With this command, you add a button to any fixed menu in an editor window. Clicking the added button will invoke the specified Praat script.

## Settings

Window
  the name of the type of window (e.g. “TextGridEditor”) that contains the menu that you want to change.
Menu
  the title of the menu that you want to change. If Window is “SoundEditor”, you can specify the File, Edit, Time, Play, Sound, Analyses, Spectrogram, Pitch, Intensity, Formants, or Pulses menu.
Command
  the title of the new menu button. To get a separator line instead of a command text, you specify a unique string that starts with a hyphen (“-”). To get a command with a rectangle to its right (like e.g. Save sound to disk: in the File menu of the SoundEditor), have the command end in a colon (“:”). To get a command with a rectangle to its right and a separator line above it, you can use e.g. `- Save sound to disk:` as a shorthand.
After command
  not used; always keep this empty (i.e. an empty string).
Depth
  0 if you want your button left-aligned in the menu, 1 if you want it indented (as e.g. the command Save selected sound as WAV file... in the File menu of the SoundEditor).
Script
  the full path name of the script to invoke. If you saved the script you are editing, its name will already have been filled in here. If you do not specify a script, you will get a separator line instead.

## Usage convention

Please adhere to the convention that commands that take arguments, such as “Lorenz...” above, end in three dots.

## Using this command in a script

To add a fixed button from a script (perhaps your initialization script or a plug-in), use the hidden shell command Add menu command... instead. It has the exact same list of parameters.

### Links to this page

- What was new in 6.4?