Using message boxes

The user can give input to the script using a message box. Dependent from the buttons that are used for the message box, the response can be received from the user. If no buttons are specified, the default button is 'OK'.

 

A message box can be created via the following function:

 

function Simple_message_box() {

 

var userResponse = MessageBox.information("We will start the batch processing now...");

BrainVoyagerQX.PrintToLog("The response was: " + userResponse);

 

}

 

When double clicking the function in the BrainVoyager menu ...

 

... the following message box will appear:

 

... and the user can only click "OK". This response is received via the variable 'userResponse' and printed to the BrainVoyager Log tab: