Matchtarget » History » Version 18
Per Amundsen, 12/07/2016 12:50 AM
1 | 5 | Per Amundsen | {{>toc}} |
---|---|---|---|
2 | |||
3 | 1 | Per Amundsen | h1. Matchtarget |
4 | |||
5 | A <matchtarget> is a text pattern that AdiIRC will use to compare with a target window during a [[Scripting_Events|scripting event]]. |
||
6 | |||
7 | 7 | Per Amundsen | Different events have different valid window locations. |
8 | |||
9 | 6 | Per Amundsen | <notextile>= - Defines dcc chat window location.</notextile> |
10 | 3 | Per Amundsen | <notextile>@ - Defines custom window location.</notextile> |
11 | 4 | Per Amundsen | <notextile>? - Defines query location.</notextile> |
12 | <notextile># - Defines channel location.</notextile> |
||
13 | 8 | Per Amundsen | <notextile>* - Defines any window location.</notextile> |
14 | 15 | Per Amundsen | <notextile>! - TODO.</notextile> |
15 | 18 | Per Amundsen | <notextile>~ - Defines a monitor panel/rawlog location. (~Rawlog, ~Transfers can also be used to match a single window, AdiIRC only)</notextile> |
16 | 16 | Per Amundsen | <notextile>%var - A [[Scripting_Variables|variable]] containing a window or a list of windows is also acceptable.</notextile> |
17 | 9 | Per Amundsen | |
18 | 11 | Per Amundsen | Multiple windows can be targeted by using commas. |
19 | |||
20 | 9 | Per Amundsen | *Example* |
21 | 1 | Per Amundsen | |
22 | <pre> |
||
23 | 11 | Per Amundsen | ; Subscribe to the TEXT event and if #channel or #channel2 matches the target channel, print a text. |
24 | on *:TEXT:*:#channel,#channel2:echo -ag #channel matched. |
||
25 | |||
26 | ; Subscribe to the TEXT event and if any channels matches the target, print a text. |
||
27 | on *:TEXT:*:#:echo -ag # matched. |
||
28 | 9 | Per Amundsen | |
29 | 13 | Per Amundsen | ; Subscribe to the TEXT event and if any channel or query matches the target, print a text. |
30 | 14 | Per Amundsen | on *:TEXT:*:#,?:echo -ag $target matched. |
31 | 13 | Per Amundsen | |
32 | 9 | Per Amundsen | ; Set a target variable. |
33 | set %target #channel |
||
34 | |||
35 | 10 | Per Amundsen | ; Subscribe to the TEXT event and if #channel matches the target channel, print a text. |
36 | 9 | Per Amundsen | on *:TEXT:*:%target:echo -ag #channel matched. |
37 | </pre> |