A macro in computer science is a rule or pattern that specifies how a certain input sequence (often a sequence of characters) should be mapped to an output sequence according to a defined procedure. The mapping process which instantiates a macro into a specific output sequence is known as macro expansion.
The term originated with macro-assemblers, where the idea is to make available to the programmer a sequence of computing instructions as a single program statement, making the programming task less tedious and less error-prone.
Macros are series of keyboard strokes or mouse clicks recorded by a certain application. It follows a sequence of rules of patterns that specifies a particular input.
The macro system converts a complicated software command into a single and simple program statement. This means that the user will have an easier, less tedious, and of course quicker way to perform a variety of computer function.
Macros can be divided into two kinds---- the keyboard and the mouse macros. Keyboard macro is a type of macro which uses a sequence of keyboard strokes. Thorough a simple combination of characters, the user can perform a variety of software commands. On the other hand, a mouse macros utilizes the mouse click to create different kinds of control commands.
The macro system is often used in different software. C language for instance, uses a built in macro system. There are however, other stand alone macro processors. This includes M4, TRAC, PHP, Macro Extension, SMX, and SAM76 among many others.