Project

General

Profile

On UNLOAD » History » Revision 4

Revision 3 (Per Amundsen, 11/14/2015 06:32 AM) → Revision 4/5 (Per Amundsen, 11/16/2015 04:24 AM)

_Added in 1.8.10_ 

 *on <level>:UNLOAD:<commands>* 

 Triggers when a script file is unloaded. 

 _See See also [[/load]], [[/reload]], [[/unload]], [[on LOAD]], [[on START]]._ START]]. 

 *Parameters* 

 <level> - The level for the event to trigger. 
 <commands> - The commands to be performed when the event listener's criteria is met. 

 *Example* 

 <pre> 
 ; 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) 
 </pre>