Author Topic: Customizing the standard macros  (Read 2733 times)


  • Senior Community Member
  • Posts: 2587
  • Hero Points: 209
  • Text
Customizing the standard macros
« on: November 01, 2019, 05:34:49 pm »
Macros and Hotfixes

I've modified several of the macros in ProgramFiles\Slickedit\Macros\*.
Everytime I get a new version of Slick I have to manually merge my changes into the new macros. A bit of a bother, but not too bad.
I've also written "joemacload.e" which reloads the macros that I modify, as well as my personal macros:

When a hotfix is loaded, all of my customized macros are lost because the hotfix includes "vslick.sta" with the full set of compiled macros. (Please, correct me if I'm wrong here).

The new macros in the hotfix are kept in config/hotfixes/

Now updating these macros with my changes is harder - I've got to expand that ZIP, and merge my changes in.
But, "joemacload" isn't smart enough to go digging through the hotfixes folder.

Is there a better way of managing this?
Of course, I could make "joemacload" a little smarter to look into the hotfixes, but maybe you guys have a better idea?

Code: [Select]
static _str slick_macro_files[] =

static boolean joeLoad(_str rootPath, _str moduleName)
    _str fullname = rootPath moduleName;
    say("Loading "  rootPath moduleName);
    int status = load(fullname);
    if (status != 0)
        say("Status " status " On load of " rootPath moduleName);
        return false;
    //say("Status OK " " On load of " rootPath moduleName);
    return true;

static void LoadMacroFiles(_str fromWhere, _str macro_files[])
    _str vslickpathfilename=slick_path_search(fromWhere, "MS");
    rootPath := _strip_filename(vslickpathfilename, "N");

    boolean ok = true;

    int i;
    for (i = 0; i < macro_files._length(); ++i)
        if (ok)
            ok = joeLoad(rootPath, macro_files[i]);
        if (ok)
            say("Loaded " macro_files[i]);
        } else {
            say("NOT Loaded " macro_files[i]);
static void SymTagload()
    LoadMacroFiles("JoesMacros.e", joes_macro_files);
    LoadMacroFiles("tbfilelist.e", slick_macro_files);