EscapeE 'eE' iconEscapeE not only enables you to save any macros which have been downloaded with a PCL document, but also to create new macros from a page of the document. These are placed directly into the Resident macros library, emulating a printer's filestore. Page(s) may also be exported as .MCR or .PCL files to other locations.

Click to expand/collapse hidden textSaving existing macros

To save any macros found in a file:

select Save downloaded macros in the library from the 'File' menu.

Message(s) will be logged will confirm that the macro has been created. EscapeE stores the macro in the Resident macro library as a file named xxx.MCR where xxx is the macro number – no conventional output stream will be produced.

Click to expand/collapse hidden textCreating macros

In most cases the best way to create a new macro is to export the page(s) to be saved in .PCL format: see PCL export options. The resulting output will be completely rewritten in a style that uses mainly HPGL. For cases where the original PCL is straightforward and does not rely on previously downloaded fonts, palettes etc. there is another mechanism which merely copies the original PCL of the page with the appropriate start macro command at the beginning and an end macro command at the end. There are two ways to invoke this – either

Select Save page as macro... from the 'File' menu. Enter a number for the macro in the File name box then click Save.
The Console window will confirm that the macro has been created, e.g.
Saving page as macro 123
Creating C:\REDTITAN\FONTS\MACROS\123.mcr
1 page

Or, to save a single page as a .MCR file:

1.Select Export... from the 'File' menu.
2.Select As a macro format.
3.Enter a File name and its path.
4.Enter a Macro identification number.
5.Click Save.

Notes

If you attempt to Save page as macro when the source file already contains a macro, you will be prompted to export in PCL format and define the macro number in the PCL options dialog.

The command line option /MACRO exports the macro and sets the PCL macro option to Permanent. E.g.

escapee test.prn /macro 123

A batch file may be used to create a PCL macro from a non-PCL file by specifying a subsequent /HP option.

Blue diamond bullet Technical notes

When the macro is opened in EscapeE, its identification number is shown on the Tool-bar. It may be invoked in a command such as

{escape}&f123Y{escape}&f3X

To include it in the Resident macro library it would need to be copied to the appropriate folder with the name 123.mcr.

This is the search order used for finding the folder in which Macros are stored:

1.A /MACROS option on the command line or in the [PCLVIEW] section of the RT.INI file.
2.The RTPCLMACROS environment symbol in the [REDTITAN] section.
3.A folder named MACROS in the 'library root folder'.
The 'library root folder' is determined as follows:
a.From the RTLIBROOT symbol. If it does not exist, then
b.if an "RTFDL" symbol specifying a folder with subfolder \* is found then that folder would be used. For example:
RTFDLLIB=D:\REDTITAN\PRINTERS';D:\REDTITAN\FONTS\*\
yields folder D:\REDTITAN.
c.Failing that the folder given by INSTALLROOTDIR with sub-folder MACROS is used.