RUNNING A MACRO

    Files - :\aacrse\505\ex9\ID9MACRO.RTF

    Stay in or load IDRISI, do not exit to DOS; clear the display
    Make sure the file idrpoly.sm2 exists in the c:\exercise directory (Use the IDRISI command             FILE/LIST/POLYGON_SYMBOL to check). If it is not present, use FILE-COPY to copy it from c:\idrisiw to c:\exercise.

    Select File - Show file contents - Edit
    Click the macro file button, name the file to be created ‘display’, and write the following macro instructions:

    display x a awrajas ethiopia n x 0 0 -1 0 -1 awrajas xx idrpoly

    where:
    1) x = batch mode;   2) a = autoscale;    3) awrajas = image file;
    4) ethiopia = palette;   5) n = NO legend (Y for yes);  6) x = dummy place holder;
    7) 0 = automatic expansion;  8) 0 = begin columns at column;  9) -1 = automatic column end;
    10) 0 = begin rows at row 0;  11) -1 = automatic row end;  12) awrajas = name of vector file; 13) x = dummy;
    14) x = dummy;    15) idrpoly = vector polygon symbol file

    1 : x (to indicate that batch mode is being used);
    2 : display option ("a" = autoscale / "n" = no autoscale)
    3 : input file name (the image file to be displayed; "img" extension assumed);
    4 : palette (see options below);
    5 : legend (Y = yes (including title, logo, and scale bar only) / N = no);
    6 : time delay before exit (Note: This parameter does not apply to this version of IDRISI for Windows. Enter "x" as a  one-character place holder.);
    7 : expansion (0 = automatic; or else a positive or negative factor);
    8 : start column (if applicable);
    9 : end column (if applicable; or else -1 = automatic);
    10 : start row (if applicable);
    11 : end row (if applicable; or else -1 = automatic);
    12 : vector overlay file (optional; name of the vector file to lay over the image file);
    13 : vector overlay color (Note: This parameter does not apply to this version of IDRISI for Windows. Enter "x" as a  one-character place holder.);
    14 : display outlines only? (Note: This parameter does not apply to this version of IDRISI for Windows. Enter "x" as a  one-character place  holder.)
    15 : symbol file (name of the symbol file to be used with the overlay vector file)

     SAVE the file. In the FILE menu, select RUN MACRO, and enter DISPLAY as the macro name.

    The %1, %2, etc, in the following display macro:

    display  x  a  %1  %2  n  x  0  0  -1  0  -1  %3  x  x  %4 (= image file with vector file overlay)
        OR
    display  x  a  %1  %2  n  x  0  0  -1  0  -1 (= no vector file overlay)

allows interactive input of file names and palettes as ‘macro parameters’ (variables) at the time the macro is run. In the first macro, the image file (%1), the image palette (%2), the vector file (%3), and the vector symbol palette (%4) would be specified (typed in) at run time.

     In the Help file, search for the item DISPLAY LAUNCHER and examine the entry under Macro Command. Examine the Macro Command entry for STRETCH.