ExecuteMenuCommand

Executes specified menu command.

Syntax

ExecuteMenuCommand(menuName)

Parameters

Parameter

Type

Description

menuName

string

Menu name. Submenus are separated by vertical bar (\|). For example: ExecuteMenuCommand('SavedResults|Quick Save Results').

Return

None.

Note

Some menu commands require user interaction. These menu commands have ellipsis (…) at the end of the menu title (for example, 'File|Open...'). Since user interaction is required, these commands cannot be used in a script. Use Script|History Script menu command view these commands with the proper command parameters.

The following menu commands are supported:

File|New
File|Restore Last Analysis
File|Load Selected Cont. Channels from 3Brain Files
File|Close
File|Save
File|Connect to Plexon Server
View|1D Data Viewer Window
View|Numerical Results Window
View|Average/Overlay Chart Window
View|Results Folder Summary
Analysis|Increase X Range
Analysis|Decrease X Range
Results|Graphical Results|Copy Graphics to the Clipboard
Results|Numerical Results|View Numerical Results Window
Results|Numerical Results|Copy Numerical Results to the Clipboard
Results|Numerical Results|Add Numerical Results as New Continuous Variables
Results|Numerical Results|Send Numerical Results to Matlab
SavedResults|Quick Save Results
SavedResults|Results Folder Summary
Graphics|Export Graphics|Copy Graphics to the Clipboard
Graphics|Fonts|Enable Font AutoScale
Graphics|Fonts|Increase font size
Graphics|Fonts|Decrease font size
Graphics|Zoom|Fit to Window
Template|Save As Default Template
3DView|View Histograms in 3D
3DView|View Histogram Variations in 3D
Matlab|Get Data From Matlab|Open Matlab As Engine
Matlab|Send Selected Variables to Matlab
Matlab|Send Numerical Results to Matlab
Online|Connect to Plexon Server
Online|Connect to Cerebus Server
Online|Connect to Neuralynx Server
Online|Connect to AlphaMap Server
Online|Pause Online Data Server Updates
Online|Reset Online Data File
Online|Disconnect from Online Data Server
Window|Numerical Results Window
Window|Close All Windows
Window|Close All Windows Except Currently Active Window

Examples

Python

import nex
doc = nex.GetActiveDocument()
nex.ApplyTemplate(doc, "PerieventHistograms")
nex.ExecuteMenuCommand("SavedResults|Quick Save Results")

NexScript

doc = GetActiveDocument()
ApplyTemplate(doc, "PerieventHistograms")
ExecuteMenuCommand("SavedResults|Quick Save Results")