Introduction

BrainStim can be started from a command prompt with special defined options accompanied with one or more parameter(s). By using these Command-Line Options it's for example possible to start BrainStim with one or more pre-defined document(s) and/or to enable/disable certain BrainStim features.

Option Parameters Meaning
-f, -F Path to document(s) separated with a ';' character Allows you to let BrainStim automatically open one or more document(s).
-v, - V Verbose mode Enables the verbose mode. In this mode BrainStim writes more detailed and more comprehensive information to the log file. It's advised to only use this option for debugging purpose.
-o, -O Option flags (followed by a single number) Allows you to define one or more option flag(s) for BrainStim. Each flag is defined by a number and multiple flags can be combined together by summing up all their values. See also the below table for the available flags with their corresponding numbering. If you would for example want BrainStim to start with the plug-ins and script bindings disabled you would use the command 'BrainStim -o 3'.
-e, -E Execute active document This parameter allows you to tell BrainStim to automatically execute the active document (after loading all of the document(s)). This is the last document defined with the -f switch.
-i, -I Only perform initialization This option initializes BrainStim and then exits again. This option is used to make sure that the Settings File is created (after the first initialization of a BrainStim installation).
-m, -M Allow multiple Instances This option forces(overrides) BrainStim to allow multiple simultaneous processes of BrainStim running, although this option may be disabled in the setting dialog.

When using the above mentioned Option flags parameter you also need to specify which flag(s) to set, these are:

Flag Number Meaning
DisableAllScriptBindings 1 The Qt Library Script Bindings are not loaded (skipped) during the startup of BrainStim.
DisableAllPlugins 2 The plugins are not loaded (skipped) during the startup of BrainStim.
DisableSplash 4 The splash message is not shown during the startup of BrainStim.
DisableNetworkServer 8 The Internal Network Interface Server is not started during the startup of BrainStim.
VerboseMode 16 Verbose mode is enabled during the startup of BrainStim, see also the above option Verbose mode (-v).
ExecuteDocument 32 The document that is active after the BrainStim startup is automatically executed, see also the above option Execute active document (-e).
AllowMultipleInstances 64 This is the same as the above explained -m option.
UserFirstTimeInit 128 If you set this flag then BrainStim will treat the startup process as if it were the first time the logged on user starts BrainStim, read this document for more information about this topic.

Example

Let's try some options by example:

  1. Open a Windows Command prompt by pressing the Windows start button , choose Run... and then enter the text cmd and hit the enter key
  2. A command prompt opens, you can now browse to the BrainStim Main Program directory by entering a command like:
    cd C:\Program Files (x86)\BrainStim
  3. Close BrainStim if it's still open.
  4. Now let's try to open and execute a file using the above information by entering a command like:
    BrainStim.exe -f Examples\BrainStim\QtScript Functions\Functions.qs -e 

    After executing the above command BrainStim should be started and the script file should be opened and executed. You can check this by reading the 'default' OutputLog tab messages.