Command Line Parameters

Command Line Parameters are commands that may be passed to Macro Express. A command line parameter follows the name of the program .exe and is separated by a single space from the name and other command line parameters.

The /A and /MXE command line parameters listed below are used for launching macros.

Use this whether or not Macro Express is already running:

"C:\Program Files (x86)\Macro Express 5\MeProc.exe" <command line parameters>

You may also use this if Macro Express is not currently running:

"C:\Program Files (x86)\Macro Express 5\MacExp.exe" <command line parameters>

Not all command line parameters may be combined on a single command line. For example, the /IC option imports the program configuration, including the macro file. This cannot be combined with the /F option used to load a macro file.

/A<Nickname> (Activate a Macro)

The Activate Macro command specifies a given macro to run when invoking Macro Express. <Nickname> is the nickname of the macro to run. For example, if a macro is nicknamed "My Address", use the command line parameter of "/AMy Address" (without quotes). This command can be particularly useful when running macros from batch files. If Macro Express is already running, it will not launch a second copy of the program yet the macro will still be executed. Spaces are allowed in the nickname.

The /A command does not load the macro file that contains the macro to be run. If that macro file is already loaded or will load when Macro Express is started, the selected macro will run. If not loaded, the macro will not execute.

üNote: If more than one macro has the specified <Nickname> only the first macro encountered with that name will run.

/A::<FileName>?<Nickname> (Activate a Macro in a specific macro file)

This Activate Macro command allows you to specify both the macro file and the specific macro to run when invoking Macro Express. <FileName> is the path to the macro file. <Nickname> is the nickname of the macro to run. Spaces are allowed in the pathname of the macro file and in the nickname. For example:

"C:\Program Files (x86)\Macro Express 5\MeProc.exe" /A::c:\My Macros\Test Macros.mex?Test macro

This command can be particularly useful when running macros from batch files or other programming languages. (See Launching macros from a command line parameter.) If Macro Express is already running, it will not launch a second copy of the program yet the macro will still be executed.

üNote: If more than one macro has the specified <Nickname> only the first macro encountered with that name will run.

üNote: The macro file containing the macro to activate must be loaded into Macro Express in order for the macro to run.

/B (Browse Mode)

This sets Macro Express to a browse mode where the macro data cannot be modified. The Macro Express editor cannot be invoked when this option is used. This option can be especially helpful in administrating uniformity of macros over a network.

/EN (Do Not Run Editor)

This option instructs the Macro Express editor to not run when the Macro Express player first runs.

/EY (Run Editor)

This option instructs the Macro Express editor to run when the Macro Express player first runs.

Use this option to select a specific Macro Express file for loading on startup of Macro Express. <Filename> is replaced with the Macro Express file name. A full path along with the ".mex" extension on the file name must be used. For example:

/Fc:\program files\macro express\mymacros.mex

üNote: This command can have spaces in the file name and the path.

The macro file specified by the /F command will be added to the list of macro files to open by Macro Express.

If the Close open macro files before loading another macro file preference option is enabled, only the macro specified by the /F command will be opened.

/H (Hide Program)

This completely hides the Macro Express player program. Invoke the Macro Express editor by using the system "Activate Macro Express Editor" hot key.

/IC<FileName> (Import Program Configuration)

This option loads in the program configuration settings on startup of Macro Express. If more than one user shares a computer, each user could have their configuration settings loaded in when they start up Macro Express. Each individual user would need to create their own startup shortcut in order to do this.

/MXE (Run .MXE file)

Use this option to run a macro that is contained in a playable macro file (.MXE file). Example: "/MXEc:\program files\macro express\mymacro.mxe" (without the quotes).

/N (Network)

This option forces the program to use the Network Mode.

/NQS (No Quick Start)

This option prevents the Quick Start program from running for the current session.

/S (Synchronize Network)

This option is only useful if the Network Mode is active. This option forces the network synchronization option to be used.

/SMxx (Synchronization Minutes)

This option is only useful if the Network Mode is active. "xx" should be substituted with the number of minutes that macro file synchronization should take place. Valid values are from 1 minute to 99 minutes. /SM10 would synchronize the file every ten minutes.

This option places an icon in the notification area.

/V (Variables)

This option is used for passing variable information into Macro Express and is best used in conjunction with one of the other commands that launches a macro. For example, launch a macro and the variable information is already predefined. Text, Integer or Decimal variable values may be used.

Follow the /V with the Text, Integer or Decimal type variable. Place a colon after the variable name and follow with the data to populate the variable value. Some examples are shown below:

/VMyString:Now is the time - Places "Now is the time" (without quotes) into variable "MyString"

/VN34:150                - Places the value 150 into variable "N34"

This function places the values into the "Saved Variable Locations". The macro must use the "Variable Restore All", "Variable Restore Text", etc. commands first before it can access the data.

üNote 1: Most of these options allow for a quick and easy setup for network considerations. For example, users can be restricted from changing Macro Express data using the browse mode, allowing manageable uniformity across the network. Users can all access the same Macro Express file using the "Load Macro Express File" option so no configuration is required by first running the program. Network usage can be enforced using the "Network" option, etc.

üNote 2: Insert quote marks around the file path and file name when there are spaces in the path or name. An example of how this would look is shown below.

"C:\Program Files (x86)\Macro Express 5\MeProc.exe" /AMyMacro

Launching macros from a command line parameter

 Below are examples of launching macros from a command line parameter with Delphi, C/C++/Visual C or VBA. Replace Filename?Macroname with the actual path, file name and macro when using this function. An example would be c:\Macro Express\mymacrofile.mex\Play System Sounds.     Example: Delphi           ShellExecute (0, nil, ‘c:\Program Files (x86)\Macro Express 5\MeProc.exe’, ‘/A::Filename?Macroname’, nil, SW_SHOW);     Example: C/C++/Visual C            ShellExecute (NULL, NULL, "c:\Program Files (x86)\Macro Express 5\MeProc.exe", "/A::Filename?Macroname", NULL, SW_SHOW);     Example: VBA       Sub CallMEMacro()         Shell ("C:\Program Files (x86)\Macro Express 5\MeProc.exe /A::Filename?Macroname")     End Sub