When more than one macro is matched by a trigger or hooked event, the following rules are used to select which of the macros will be run:
Macros are tested in order of decreasing priority. Fall-thrus of a given priority are compared before non-fall-thrus of the same priority.
Each matching fall-thru macro is executed immediately when it is found. When the first matching non-fall-thru macro is found, all the non-fall-thrus of equal priority are collected, and the search ends. One of the non-fall-thrus is chosen at random and executed.
So, in the simple case when there are no fall-thrus, the highest priority match is chosen. If there is more than one of the highest priority, one of those is chosen at random.
Fall-thru macros are defined with /def -F.
See: triggers, hooks, macros, /def