Matchtarget » History » Revision 9
Revision 8 (Per Amundsen, 11/14/2015 02:02 AM) → Revision 9/24 (Per Amundsen, 11/14/2015 02:11 AM)
{{>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>%var - A [[Scripting_Variables|variable]] containing a window or a list of window is also acceptable.</notextile>
*Example*
<pre>
; Subscribe to the TEXT event and if #channel, matches the target channel, print a text.
on *:TEXT:*:#channel:echo -ag #channel 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>