Command Macro Support

Command Macro Support


The old SPFLite  .SPM macros supported by previous SPFLite releases are no longer supported.


There is a separate Help document for programmable macros, which can be used either as edit primary-command macros and edit line-command macros.  To view the separate Help document, you may enter HELP MACROS on the SPFLite command line.  In addition, since the new macro facility utilizes thinBasic as the interpreter engine, help for thinBasic itself can be reached by entering HELP THINBASIC.


There is a macro called SPMConvert.MACRO, available which you can use this to convert any old SPM macros to the new thinBasic -based macro format.



Using the SPMConvert Conversion Aid


Since the old SPM style macros are usually very simple (they could only contain a series of Primary commands), the conversion of these macros to the new macro support is fairly straightforward.  A conversion tool is available to assist in migrating your old .SPM macros to the new .MACRO format.


To do this, proceed as follows:


    1. One by one, Edit each of your old .SPM macros.
    2. On the Command line, enter SPMCONVERT.
    3. SPMCONVERT is, itself, a macro in the new .MACRO format.   It will process the text of the original macro and convert the statement into one suitable for the new macro support.
    4. If there are any areas of concern, the macro will insert a =NOTE> line following the line it could not completely convert.
    5. The converted macro will be stored in the new SPFLite\Macros\  folder for immediate use.
    6. If the macro could not be stored (e.g. it already exists from a previous conversion) then an error message will be produced suggesting you should use a REPLACE command to save the file.
    7. Review any =NOTE> lines that may be present and resolve them.  Unfortunately, this will probably mean doing research for the new macro support to determine the correct coding required.   Enter HELP MACROS to open the new Macro support Help file.
    8. Enter CANCEL on the command line to avoid saving the converted macro back into the original SPM file.


The only known items that the conversion does not handle are the complex substitution variables like ~K(...)  and ~S(...).


Created with the Personal Edition of HelpNDoc: Easily create EPub books