Dialog function – Multichannel Systems NeuroExplorer User Manual
Page 207

5.5.6.4. Dialog Function
Dialog Function
Shows a dialog that can be used to specify the script parameters.
Syntax
double Dialog(doc, par1, name1, type1, par2, name2, type2, ...)
Parameters
Parameter
Type
Description
doc
documentReference Reference to the document. Could be zero if all the
type values are "number" or "string".
par1
variable
A variable that will be assigned a value after Dialog
exits. The variable should be created before the
Dialog function is called
name1
string
Prompt that will be shown in the dialog.
type1
string
Parameter type. It should be one of: "number",
"string", "neuron", "neuronorevent", "event",
"interval", "wave", "continuous", "marker" or "all".
Returns
Dialog function returns 1 if user pressed OK button or 0, if user pressed Cancel button.
Comments
None
Usage
NexScript
% create a string variable
filefilter = "c:\data\*.nex"
% show the dialog to the user
res = Dialog(0., filefilter , "File Filter:", "string")
The following dialog will be shown:
Now a user can type the new value in the File Filter edit box. If the user presses OK button, the
Dialog function returns 1, otherwise, it returns 0.
Page 205