Project

General

Profile

On LOAD » History » Revision 7

Revision 6 (Per Amundsen, 11/14/2015 06:32 AM) → Revision 7/8 (Per Amundsen, 11/16/2015 04:23 AM)

_Added in 1.8.10_ 

 *on <level>:LOAD:<commands>* 

 Triggers the first time a script file is loaded. 

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

 *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 init alias. 
 alias -l initscript { 
   ; Set the %loaded variable to 'on' 
   set %loaded on 
 } 

 ; Listen for the LOAD event, and when matched, run this initscript alias. 
 on *:LOAD:initscript | echo -ag Script is $iif(%loaded,loaded,not loaded) 
 </pre>