Summary

In executables made with MMF, you can use command lines to do clever things with the application properties before you run the EXE. For example, without building two EXEs, you can turn on and off the DirectX option in a game.


How do you do this?

Create a new shortcut pointing to your MMF-built EXE. Before confirming it, add on to the end of it a command line. For example:
C:\MMF\Mygame.exe /DDRAW
The /DDRAW bit is the command line.
Another way is to use another MMF application, and use the File Object to run another application. You would run C:\MMF\Mygame.exe with command line /DDRAW.


What are all the command line switches?

/DIB = Turns off both DirectX and Use VRAM options.
/DDRAW = Forces the use of DirectX.
/NOVR = Turns off the VRAM option.
/NOF = No full screen mode. Ignores the option Change resolution mode.
/S0 = Low task priority
/S50 = Medium task priority
/S100 = High task priority (the default)
/DEBUG = Will display the current graphic mode in the bar at the top of the application (if it's there).
/nods = No Direct Sound.
/nox = Disables the Alt+F4 key, like Disable Close in properties.

You can use more than one command line: E.g. C:\MMF\Mygame.exe /S50 /DDRAW will force DirectX on and put task priority to medium.


So how is it useful?

If you have two seperate EXEs - one is an EXE for navigating the menus for your game, the other is the actual game levels itself - then in the menu EXE you can have options to turn on and off DirectX in the main game, and so on. However it does present difficulties when going between the EXEs and if the user runs the EXE holding levels from windows. This is overcome by some INI usage. Terminal Orbit is a good example of this in action.


So how do I use the INI to help?

An example would be:
To stop user running levels from windows - In an INI, set a value to 1374 (or any number) when the user launches the game from the EXE holding the menus. When the EXE holding the levels starts up, check if that value is 1374. If not, give a warning and close. If it is, set the value to 0 and carry on.
To go between EXEs without seeing Windows - Applications close instantly usually, but take a few seconds to open. To get around this, in the EXE holding menus, display a message saying 'Loading' whilst loading the EXE with levels. When the EXE with levels has loaded, use the INI in a similar way as before to tell the menu EXE to close.


Also note...

Another important thing abput command lines is you can't use modifications of existing commands. For example, if you use the command /stoplogging, MMF recognises /s as the beginning of a set task priority command (/s50 for example). It doesn't recognise 'toplogging' so it sets task priority to 0. Annoying, so you have to know this to be able to avoid it.
Also, /f, /r, /w, /m and /uns are used in MMF internally. It should work using commands with those beginnings because they don't have parameters, but if you experience problems try avoiding starting a command line with them.


Conclusion

Command lines are cool and can add some useful options to your game to help some people with slow PCs.