Project

General

Profile

Matchtarget » History » Revision 22

Revision 21 (Per Amundsen, 12/13/2019 06:27 PM) → Revision 22/24 (Per Amundsen, 12/13/2019 06:27 PM)

{{>toc}} 

 h1. Matchtarget 

 A <matchtarget> is a text pattern that AdiIRC will use to compare with a target window during a [[Scripting_Events|scripting event]]. 

 Different events have different valid window locations. 

 <notextile>= - Defines dcc chat window location.</notextile> 
 <notextile>@ - Defines custom window location.</notextile> 
 <notextile>? - Defines query location.</notextile> 
 <notextile># - Defines channel location.</notextile> 
 <notextile>* - Defines any window location.</notextile> 
 <notextile>! - TODO.</notextile> 
 <notextile>~ - Defines a monitor panel/rawlog location. (~Rawlog, ~Transfers can also be used to match a single window, AdiIRC only)</notextile> *AdiIRC only)*</notextile> 
 <notextile>%var - A [[Scripting_Variables|variable]] containing a window, a list of windows is also acceptable.</notextile> 

 Multiple windows can be targeted by using commas. 

 _See also [[$matchkey]]._ 

 *Example* 

 <pre> 
 ; Subscribe to the TEXT event and if #channel or #channel2 matches the target channel, print a text. 
 on *:TEXT:*:#channel,#channel2:echo -ag #channel matched. 

 ; Subscribe to the TEXT event and if any channels matches the target, print a text. 
 on *:TEXT:*:#:echo -ag # matched. 

 ; Subscribe to the TEXT event and if any channel or query matches the target, print a text. 
 on *:TEXT:*:#,?:echo -ag $target matched. 

 ; Set a target variable. 
 set %target #channel 

 ; Subscribe to the TEXT event and if #channel matches the target channel, print a text. 
 on *:TEXT:*:%target:echo -ag #channel matched. 
 </pre>