Joe White’s Blog

Life, .NET, and Cats


Saving macros for later

Several people clued me in on a couple of ways to save macros for later. I haven’t had a chance to try either one yet (so someone correct me if I say something wrong about either), but they both sound great — and both are open-source.

(I’m really curious how they do it… I should look at their code sometime.)

GExperts Macro Library

GExperts includes a dockable Macro Library window. It lets you have multiple macros, lets you assign names and descriptions to them, and automatically saves them when you close the IDE.

I’m not sure where it saves them, though. This would be terrific if we could save them in revision control somehow — otherwise, with eight development machines, the macro I want would inevitably be on one of the other computers.

Keyboard macro manager on CodeCentral

TOndrej wrote a keyboard macro manager that you can compile into a design-time package and register in the IDE.

This one definitely can save the macros to a file, so could probably be used to share macros between computers.

5 Responses to “Saving macros for later”

  1. gabr Says:

    I believe GExperts macros are stored in {Program Files}\GExperts for Delphi 11\MacroLibrary.xml (replace the second part of this path with the folder where you have installed GExperts).

  2. Thomas Mueller Says:

    re GExperts:
    The Macro library stores the macros in \application data\gexperts\delphi \macrolibrary.xml
    I am not sure whether it is possible to configure where it stores that file, but I have not found such an option. (OTOH it would be easy to add it, just grab the source code…)
    It also has got an import and export function that reads/writes single macros in xml format.

  3. Thomas Mueller Says:

    The comment function does not allow > and < in the text, so the above should have been:
    [home]\application data\gexperts\delphi [version]\macrolibrary.xml

    twm

  4. gabr Says:

    Interesting. On my computer, there’s nothing in AppData. GExperts is storing evering in Program Files. XP Pro here - are you running Vista?

  5. Xepol Says:

    The keyboard macro manager from code central doesn’t work correctly with D2007, but since it only claims compatbility with D6, I guess it isn’t a huge surprise (what will all the changes since then). It appears to keep refocusing the messages window instead.

    It is a great example on how to create a toolbar in the IDE however, and chances are it can be fixed to work correctly with D2007 (perferably without driving me insane!)

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Joe White's Blog copyright © 2004-2008. Portions of the site layout use Yahoo! YUI Reset, Fonts, and Grids.
Proudly powered by WordPress. Entries (RSS) and Comments (RSS).