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.
These switches are not case-sensitive and can be used in any order.
Automatically begins playing the sequence as soon as MECControl opens.
Automatically closes MECControl as soon as the sequence ends, a Stop command is played, or there is an error.
Causes MECControl to ignore Connect commands, so that any connected devices will not be initialised.
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.
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.
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:
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
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: