Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

28 Working with macros > 28.1 Defining and invoking macros > 28.1.1 Defining macros > 28.1.1.1 Understanding what a macro definition can include


28.1.1.1 Understanding what a macro definition can include

Macros can include more than simple code:

For HTML output a macro can contain HTML code, JavaScript, or anything else printable that follows the rules of whatever language you are using.

For RTF output, a macro can insert Field content or Windows system commands.

For all types of output, a macro can specify Windows system commands, provided double any backslashes and enclose paths that contain spaces in double quotes; see §34.4.6 Supplying system commands in a macro.

A macro can be any length. You can define macros to use as “building blocks” for other macros. There is no limit to the number of macros you can define for a project.

Note:  You do not have to define every string of code as a macro. Any place in the configuration file where you can use a macro, you can also use plain HTML or RTF code, provided you include the entire code string on one line.

Whether you use a formal named macro definition or an informal string of code, for HTML output Mif2Go always inserts an extra line break in the output immediately before the expanded macro. This is so you can readily identify macro-supplied code, for ease in correcting any errors in your macro settings. Browsers ignore the extra line break.



28 Working with macros > 28.1 Defining and invoking macros > 28.1.1 Defining macros > 28.1.1.1 Understanding what a macro definition can include