How to auto execute a macro when opening a Powerpoint presentation?

While Auto_Open doesn’t run in a PowerPoint presentation, you can fake it. Add a CustomUI part to the presentation, then use the CustomUI OnLoad callback to run code when the presentation opens. The CustomUI part needs no more than just the CustomUI tags. Get the Custom UI Editor from here: http://openxmldeveloper.org/articles/customuieditor.aspx Open the presentation in … Read more

Can’t access Parent’s Members while dealing with Macro Annotations

Trees that go into macro annotation arguments are purposefully untyped. However running c.typeCheck(q”(??? : <tree that represents the parent>)”).tpe will provide the missing information. Don’t forget to duplicate that tree before typechecking, because c.typeCheck mutates the tree in place, which might be undesireable. In case when both parent and child are declared in the same … Read more

How to find out cl.exe’s built-in macros

This method does amount to asking the compiler for the list of predefined macros, but it uses undocumented features and provides only a partial list. I include it here for completeness. The Microsoft C/C++ compiler allows an alternative compiler front-end to be invoked using the /B1 and /Bx command line switches for .c and .cpp … Read more

How to write macro for Notepad++?

Macros in Notepad++ are just a bunch of encoded operations: you start recording, operate on the buffer, perhaps activating menus, stop recording then play the macro. After investigation, I found out they are saved in the file shortcuts.xml in the Macros section. For example, I have there: <Macro name=”Trim Trailing and save” Ctrl=”no” Alt=”yes” Shift=”yes” … Read more