_Added in 1.8.10_ *on :UNLOAD:* Triggers when a script file is unloaded. _See also [[/load]], [[/reload]], [[/unload]], [[on LOAD]], [[on START]]._ *Parameters* - The [[User Access Level]] for the event to trigger. - The commands to be performed when the event listener's criteria is met. *Example*
; Create a cleanup alias.
alias -l cleanup {
  ; Unset the %loaded variable
  unset %loaded
}

; Listen for the UNLOAD event, and when matched, run this cleanup alias.
on *:UNLOAD:cleanup | echo -ag Script is $iif(%loaded,loaded,not loaded)