Runnexscriptcommands method – Multichannel Systems NeuroExplorer User Manual
Page 331

6.1.9. RunNexScriptCommands Method
Application.RunNexScriptCommands Method
Runs the specified NexScript text. Returns true if succeeded.
Syntax
bool RunNexScript ( string script )
Parameters
Parameter
Type
Description
script
string
Script text. Script lines should be separated by \n.
Returns
Returns true if script succeeded, otherwise, returns false.
Usage
Matlab
nex = actxserver('NeuroExplorer.Application');
res = nex.RunNexScriptCommands('doc=GetActiveDocument()\ndoc.NewEvent =
Sync(doc.Neuron04a, doc.Neuron05b, -0.01, 0.01)')
res =
nex.RunNexScriptCommands('doc=GetActiveDocument()\nApplyTemplate(doc,"AutoCorrelog
rams")');
JavaScript
var nex = new ActiveXObject("NeuroExplorer.Application");
// note that in JavaScript you need to use double backslashes
// when specifying end of line (\n)
var res = nex.RunNexScriptCommands("doc=GetActiveDocument()\\ndoc.NewEvent =
Sync(doc.Neuron04a, doc.Neuron05b, -0.01, 0.01)");
See Also
Page 329