Command line control

When executing the MECControl software from the command line, you can control its basic behaviour by appending the fully-qualified path to a sequence file and one or more switches:

meccontrol.exe "<PathToSequenceFile>" /AutoPlay /AutoClose /NoConnect /NoStop /NoUI

The meccontrol.exe program can be found deep inside your AppData folder. A new folder containing the latest version of the program will be created whenever you update or re-install MECControl.

Here is an example of a path to the program:

C:\Users\Tim\AppData\Local\Apps\2.0\4CH3WZ3R.AXM\XHMR5VOD.ZAR\mecc..tion_a09f9fa6298e5749_0001.0002_f13f0a1eb0912710\meccontrol.exe

To view these folders in Windows Explorer you will need to open Folder Options, choose the View tab, and ensure that ‘Show hidden files, folders, and drives’ is selected.

Switch reference

These switches are not case-sensitive and can be used in any order.

AutoPlay

Automatically begins playing the sequence as soon as MECControl opens.

AutoClose

Automatically closes MECControl as soon as the sequence ends, a Stop command is played, or there is an error.

NoConnect

Causes MECControl to ignore Connect commands, so that any connected devices will not be initialised.

NoStop

Causes MECControl to refrain from stopping and resetting any connected devices when the sequence ends, a Stop command is played, or there is an error.

NoUI

Causes MECControl to open without displaying its user interface. If MECControl is playing a sequence that waits for a keypress or includes an infinite loop, the only way to close it will be to terminate its process in Windows Task Manager.

This switch will be ignored unless both the AutoPlay and AutoClose switches are also specified.

Using a batch file

You can execute MECControl from a batch file using the MS-DOS start command. The addition of the wait switch to the command will pause the execution of the batch file until MECControl closes, making it possible to execute MECControl multiple times to play the same or different sequences.

For example, create and save these two sequences in MECControl:

example1.seq

Connect Status LED To Pin 13

Light Status
Wait 1 Second
Light Status Black
Wait 1 Second
Light Status
Wait 1 Second
Light Status Black
Wait 1 Second
Light Status

Stop

example2.seq

Connect Status LED To Pin 13

Wait 5 Seconds

Light
Status
Wait 0.5 Seconds
Light Status Black
Wait 0.5 Seconds
Light Status
Wait 0.5 Seconds
Light Status Black
Wait 0.5 Seconds
Light Status

Stop

Now create a new batch file (a text file with the extension .bat) containing the following commands:

start /wait <PathToProgram>\meccontrol.exe "<PathToSequenceFile>\example1.seq" /AutoPlay /AutoClose /NoStop

start /wait <PathToProgram>\meccontrol.exe "<PathToSequenceFile>\example2.seq" /AutoPlay /AutoClose /NoConnect

When you execute the batch file, the following actions will occur:

  1. The first start command executes MECControl and example1.seq begins playing.
  2. The LED flashes at 1 second intervals, leaving the LED lit.
  3. MECControl closes when the Stop command is reached, and the /NoStop switch prevents the LED being reset.
  4. The second start command executes MECControl and example2.seq begins playing.
  5. The /NoConnect switch stops the LED being initialised, so it remains lit.
  6. After a 5 second delay, the LED flashes at 0.5 second intervals.
  7. When the Stop command is reached, MECControl closes — and the LED is reset.