Hooking Startup and Exit

Invoking a Macro on Startup

To invoke any macro command defined by typing _command or an external program when the editor initializes, use the -# invocation option. For example, invoking the command vs makefile -#bottom_of_buffer loads the file makefile and executes the bottom_of_buffer command. To invoke a command with parameters, place the command and parameters inside double quotes. Another method for getting macro code to start without changing any invocation options is to create a module with a definite entry point.

Invoking a Macro on Exit

If you want a function to be invoked when the editor exits, create a macro procedure with a name that has the prefix _exit_. To automatically invoke a macro when exiting SlickEditŪ, use the following code:

_exit_cleanup_stuff()
{
    messageNwait("Got here");
}