Commands documented to take a parameter of type Hook are special. In place of the hook parameter, you specify the name of a hook (not as a string!), for example,

 On Load Do MyAddon.Initialize

This special behaviour is only available for elementary functions and commands. You cannot write functions or subroutines that take Hook parameters.

You can also specify the name of the hook as an expression using the ByName() pseudo-function:

 On ByName(n) Do Whatever

Here, the name of the hook is specified in variable n.

Commands and Functions taking Hook as Parameter

Functions returning Hook