Run your code before/After other code:
https://wiki.esoui.com/How_to_run_yo...eHook/PostHook)
Event handlers on controls (if you do not want to use a PreHook/PostHook you can register your own event handler like OnMouseUp or OnClicked etc. to a control -> Not to a function!):
https://wiki.esoui.com/SetHandler
There also exists ZO_PreHookHandler and ZO_PostHookHandler but the new eventHandlers 8see the link above) will take care of the run order, so these functions shouldn't be used anymore if not necessary.