Scripting Commands » History » Version 186
Per Amundsen, 03/23/2019 08:34 PM
1 | 162 | Mr. BS | {{css |
---|---|---|---|
2 | body { |
||
3 | counter-reset: count; |
||
4 | } |
||
5 | .tcount { |
||
6 | counter-reset: adi; |
||
7 | } |
||
8 | .tcount a { |
||
9 | counter-increment: count; |
||
10 | } |
||
11 | .tcount strong { |
||
12 | counter-increment: adi; |
||
13 | } |
||
14 | .acounter::before { |
||
15 | content: "Total: " counter(count) " commands, " counter(adi) " are AdiIRC exclusive. "; |
||
16 | } |
||
17 | }} |
||
18 | |||
19 | 73 | Per Amundsen | {{>toc}} |
20 | 1 | Per Amundsen | |
21 | h1. Scripting Commands |
||
22 | 2 | Per Amundsen | |
23 | Parameters in [x] means they are optional. |
||
24 | Parameters in <x> means they are required. |
||
25 | Parameters with a x|y means either x or y can be used. |
||
26 | 3 | Per Amundsen | |
27 | Click on a command to read more about it. |
||
28 | 154 | Per Amundsen | |
29 | 27 | Per Amundsen | _Commands in bold is AdiIRC only._ |
30 | 1 | Per Amundsen | |
31 | 162 | Mr. BS | table(tcount). |
32 | |[[/abook]] |
||
33 | 123 | Per Amundsen | *[[/aclear]]* |
34 | 1 | Per Amundsen | [[/action]] |
35 | 27 | Per Amundsen | *[[/advertise]]* |
36 | 1 | Per Amundsen | [[/ajinvite]] |
37 | [[/alias]] |
||
38 | [[/aline]] |
||
39 | [[/amark]] |
||
40 | [[/ame]] |
||
41 | [[/amsg]] |
||
42 | 84 | Per Amundsen | *[[/allnick]]* |
43 | 1 | Per Amundsen | [[/anick]] |
44 | 172 | Per Amundsen | [[/aop]] |
45 | 74 | Per Amundsen | [[/auser]] |
46 | 136 | Per Amundsen | *[[/autoconnect]]* |
47 | 53 | Per Amundsen | [[/autojoin]] |
48 | 172 | Per Amundsen | [[/avoice]] |
49 | 27 | Per Amundsen | *[[/aquit]]* |
50 | 1 | Per Amundsen | [[/away]] |
51 | 27 | Per Amundsen | *[[/back]]* |
52 | 1 | Per Amundsen | [[/background]] |
53 | [[/ban]] |
||
54 | 27 | Per Amundsen | *[[/banlist]]* |
55 | 1 | Per Amundsen | [[/bcopy]] |
56 | [[/beep]] |
||
57 | 27 | Per Amundsen | *[[/betaup]]* |
58 | *[[/bin2txt]]* |
||
59 | 1 | Per Amundsen | [[/bindip]] |
60 | [[/bread]] |
||
61 | [[/break]] |
||
62 | [[/breplace]] |
||
63 | [[/bset]] |
||
64 | [[/btrunc]] |
||
65 | [[/bunset]] |
||
66 | 27 | Per Amundsen | *[[/bw]]* |
67 | 1 | Per Amundsen | [[/bwrite]] |
68 | [[/channel]] |
||
69 | 147 | Per Amundsen | *[[/channels]]* |
70 | 27 | Per Amundsen | *[[/charset]]* |
71 | 1 | Per Amundsen | [[/clear]] |
72 | [[/clearall]] |
||
73 | [[/cline]] |
||
74 | [[/clipboard]] |
||
75 | 141 | Per Amundsen | [[/close]] |
76 | 1 | Per Amundsen | [[/cnick]] |
77 | 172 | Per Amundsen | | [[/color]] |
78 | 1 | Per Amundsen | [[/colour]] |
79 | 172 | Per Amundsen | [[/comclose]] |
80 | 145 | Per Amundsen | [[/comlist]] |
81 | 123 | Per Amundsen | [[/comopen]] |
82 | 84 | Per Amundsen | [[/comreg]] |
83 | 74 | Per Amundsen | *[[/config]]* |
84 | 32 | Per Amundsen | [[/continue]] |
85 | 66 | Per Amundsen | [[/copy]] |
86 | 1 | Per Amundsen | [[/ctcp]] |
87 | [[/ctcps]] |
||
88 | 57 | Per Amundsen | [[/ctcpreply]] |
89 | 158 | Per Amundsen | *[[/cycleall]]* |
90 | 54 | Per Amundsen | [[/dcc]] |
91 | 52 | Per Amundsen | [[/dde]] |
92 | 41 | Per Amundsen | [[/ddeserver]] |
93 | [[/debug]] |
||
94 | 32 | Per Amundsen | [[/dec]] |
95 | 27 | Per Amundsen | *[[/dehalfop]]* |
96 | *[[/deop]]* |
||
97 | 1 | Per Amundsen | [[/describe]] |
98 | 27 | Per Amundsen | *[[/desop]]* |
99 | *[[/devoice]]* |
||
100 | 1 | Per Amundsen | [[/dialog]] |
101 | [[/did]] |
||
102 | [[/didtok]] |
||
103 | [[/disable]] |
||
104 | [[/disconnect]] |
||
105 | 94 | Per Amundsen | [[/dlevel]] |
106 | 1 | Per Amundsen | [[/dline]] |
107 | [[/dll]] |
||
108 | [[/dns]] |
||
109 | 27 | Per Amundsen | *[[/dock]]* |
110 | *[[/dockpanels]]* |
||
111 | 128 | Per Amundsen | *[[/download]]* |
112 | 1 | Per Amundsen | [[/drawcopy]] |
113 | [[/drawdot]] |
||
114 | [[/drawfill]] |
||
115 | [[/drawline]] |
||
116 | [[/drawpic]] |
||
117 | [[/drawrect]] |
||
118 | [[/drawreplace]] |
||
119 | [[/drawrot]] |
||
120 | [[/drawsave]] |
||
121 | [[/drawscroll]] |
||
122 | 172 | Per Amundsen | | [[/drawtext]] |
123 | 136 | Per Amundsen | [[/ebeeps]] |
124 | 172 | Per Amundsen | [[/echo]] |
125 | 145 | Per Amundsen | *[[/echomonitor]]* |
126 | 123 | Per Amundsen | *[[/echox]]* |
127 | 97 | Per Amundsen | *[[/edit]]* |
128 | 94 | Per Amundsen | [[/editbox]] |
129 | 84 | Per Amundsen | [[/else]] |
130 | 74 | Per Amundsen | [[/elseif]] |
131 | 88 | Per Amundsen | [[/emailaddr]] |
132 | 66 | Per Amundsen | [[/enable]] |
133 | 1 | Per Amundsen | *[[/encoding]]* |
134 | [[/events]] |
||
135 | [[/exit]] |
||
136 | 60 | Per Amundsen | *[[/fakeraw]]* |
137 | 57 | Per Amundsen | [[/fclose]] |
138 | 144 | Per Amundsen | *[[/fget]]* |
139 | 54 | Per Amundsen | [[/filter]] |
140 | 52 | Per Amundsen | [[/findtext]] |
141 | 160 | Per Amundsen | [[/firewall]] |
142 | 50 | Per Amundsen | [[/flash]] |
143 | 1 | Per Amundsen | [[/flist]] |
144 | [[/flushini]] |
||
145 | 67 | Per Amundsen | [[/font]] |
146 | 124 | Per Amundsen | [[/fopen]] |
147 | 39 | Per Amundsen | [[/fseek]] |
148 | 144 | Per Amundsen | [[/fsend]] |
149 | 85 | Per Amundsen | [[/fullname]] |
150 | 45 | Per Amundsen | *[[/fullscreen]]* |
151 | 174 | Per Amundsen | [[/fupdate]] |
152 | 36 | Per Amundsen | [[/fwrite]] |
153 | 33 | Per Amundsen | *[[/gcmem]]* |
154 | 167 | Per Amundsen | *[[/globalkeys]]* |
155 | 32 | Per Amundsen | *[[/google]]* |
156 | 23 | Per Amundsen | [[/goto]] |
157 | 143 | Per Amundsen | [[/groups]] |
158 | 77 | Per Amundsen | [[/guser]] |
159 | 1 | Per Amundsen | [[/hadd]] |
160 | 27 | Per Amundsen | *[[/halfop]]* |
161 | 1 | Per Amundsen | [[/halt]] |
162 | [[/haltdef]] |
||
163 | [[/hdec]] |
||
164 | [[/hdel]] |
||
165 | [[/help]] |
||
166 | [[/hfree]] |
||
167 | 174 | Per Amundsen | | *[[/highlight]]* |
168 | [[/hinc]] |
||
169 | 1 | Per Amundsen | [[/hload]] |
170 | 172 | Per Amundsen | [[/hmake]] |
171 | 167 | Per Amundsen | [[/hop]] |
172 | 160 | Per Amundsen | [[/hotlink]] |
173 | 157 | Per Amundsen | [[/hsave]] |
174 | 183 | Per Amundsen | [[/ial]] |
175 | 184 | Per Amundsen | [[/ialfill]] |
176 | 145 | Per Amundsen | [[/ialmark]] |
177 | 1 | Per Amundsen | [[/identd]] |
178 | 128 | Per Amundsen | *[[/icon]]* |
179 | 140 | Per Amundsen | [[/if]] |
180 | 124 | Per Amundsen | [[/ignore]] |
181 | 123 | Per Amundsen | [[/iline]] |
182 | 122 | Per Amundsen | [[/inc]] |
183 | 141 | Per Amundsen | *[[/inick]]* |
184 | 175 | Per Amundsen | *[[/inlineimage]]* |
185 | 96 | Per Amundsen | [[/invite]] |
186 | 94 | Per Amundsen | [[/iuser]] |
187 | 89 | Per Amundsen | [[/join]] |
188 | 168 | Per Amundsen | *[[/kblayout]]* |
189 | 88 | Per Amundsen | [[/kick]] |
190 | 85 | Per Amundsen | [[/kill]] |
191 | 84 | Per Amundsen | *[[/lag]]* |
192 | 126 | Per Amundsen | [[/leave]] |
193 | 149 | Per Amundsen | *[[/linemarker]]* |
194 | 78 | Per Amundsen | [[/linesep]] |
195 | 77 | Per Amundsen | [[/list]] |
196 | 74 | Per Amundsen | [[/load]] |
197 | 67 | Per Amundsen | [[/loadbuf]] |
198 | 66 | Per Amundsen | *[[/lock]]* |
199 | 130 | Per Amundsen | [[/log]] |
200 | 1 | Per Amundsen | *[[/logs]]* |
201 | [[/logview]] |
||
202 | [[/markall]] |
||
203 | 69 | Per Amundsen | [[/mdi]] |
204 | 57 | Per Amundsen | [[/me]] |
205 | 1 | Per Amundsen | [[/menubar]] |
206 | [[/mkdir]] |
||
207 | 85 | Per Amundsen | [[/mnick]] |
208 | 50 | Per Amundsen | [[/mode]] |
209 | 1 | Per Amundsen | [[/msg]] |
210 | *[[/msgbox]]* |
||
211 | *[[/mute]]* |
||
212 | 184 | Per Amundsen | | *[[/nextunread]]* |
213 | [[/nick]] |
||
214 | 183 | Per Amundsen | *[[/nickcolumn]]* |
215 | 182 | Per Amundsen | *[[/nicklist]]* |
216 | 174 | Per Amundsen | *[[/nmsg]]* |
217 | 171 | Per Amundsen | [[/noop]] |
218 | 172 | Per Amundsen | [[/notice]] |
219 | 168 | Per Amundsen | [[/notify]] |
220 | 167 | Per Amundsen | *[[/np]]* |
221 | 160 | Per Amundsen | *[[/oline]]* |
222 | 149 | Per Amundsen | [[/omsg]] |
223 | 145 | Per Amundsen | [[/onotice]] |
224 | 132 | Per Amundsen | [[/op]] |
225 | 130 | Per Amundsen | *[[/options]]* |
226 | 128 | Per Amundsen | [[/parseline]] |
227 | 126 | Per Amundsen | [[/part]] |
228 | 125 | Per Amundsen | [[/partall]] |
229 | 123 | Per Amundsen | *[[/paths]]* |
230 | 169 | Per Amundsen | *[[/pause]]* |
231 | 122 | Per Amundsen | [[/perform]] |
232 | 121 | Per Amundsen | *[[/pgoogle]]* |
233 | 118 | Per Amundsen | *[[/plugins]]* |
234 | 176 | Per Amundsen | [[/play]] |
235 | 99 | Per Amundsen | *[[/priv]]* |
236 | 137 | Per Amundsen | [[/proxy]] |
237 | 96 | Per Amundsen | [[/query]] |
238 | 95 | Per Amundsen | [[/queryrn]] |
239 | 94 | Per Amundsen | *[[/quickconnect]]* |
240 | 89 | Per Amundsen | *[[/quicksave]]* |
241 | 88 | Per Amundsen | [[/quit]] |
242 | 1 | Per Amundsen | [[/quote]] |
243 | 85 | Per Amundsen | [[/raw]] |
244 | 84 | Per Amundsen | *[[/rawx]]* |
245 | *[[/rawlog]]* |
||
246 | 85 | Per Amundsen | *[[/realname]]* |
247 | 77 | Per Amundsen | *[[/reconnect]]* |
248 | 173 | Per Amundsen | *[[/refreshsong]]* |
249 | 74 | Per Amundsen | *[[/rejoin]]* |
250 | 69 | Per Amundsen | [[/reload]] |
251 | 67 | Per Amundsen | [[/remini]] |
252 | 66 | Per Amundsen | [[/remote]] |
253 | 1 | Per Amundsen | [[/remove]] |
254 | [[/rename]] |
||
255 | [[/renwin]] |
||
256 | [[/reseterror]] |
||
257 | 184 | Per Amundsen | |^. [[/resetidle]] |
258 | *[[/resolve]]* |
||
259 | 183 | Per Amundsen | *[[/restart]]* |
260 | 176 | Per Amundsen | [[/return]] |
261 | 175 | Per Amundsen | [[/returnex]] |
262 | 174 | Per Amundsen | [[/rlevel]] |
263 | 173 | Per Amundsen | [[/rline]] |
264 | 171 | Per Amundsen | [[/rmdir]] |
265 | 172 | Per Amundsen | [[/run]] |
266 | 169 | Per Amundsen | [[/ruser]] |
267 | 168 | Per Amundsen | [[/say]] |
268 | 167 | Per Amundsen | [[/savebuf]] |
269 | 160 | Per Amundsen | [[/saveini]] |
270 | 149 | Per Amundsen | [[/scid]] |
271 | 145 | Per Amundsen | [[/scon]] |
272 | 132 | Per Amundsen | *[[/scripts]]* |
273 | 164 | Per Amundsen | *[[/scrolltext]]* |
274 | 130 | Per Amundsen | *[[/search]]* |
275 | 179 | Per Amundsen | *[[/sendkeys]]* |
276 | 128 | Per Amundsen | [[/server]] |
277 | 126 | Per Amundsen | *[[/serverlist]]* |
278 | 124 | Per Amundsen | [[/set]] |
279 | 123 | Per Amundsen | *[[/setconfig]]* |
280 | 122 | Per Amundsen | [[/setlayer]] |
281 | 123 | Per Amundsen | *[[/setoption]]* |
282 | *[[/showadiirc]]* |
||
283 | 148 | Per Amundsen | *[[/showmenu]]* |
284 | 98 | Per Amundsen | [[/showmirc]] |
285 | 96 | Per Amundsen | [[/signal]] |
286 | 95 | Per Amundsen | *[[/slap]]* |
287 | 94 | Per Amundsen | *[[/sleep]]* |
288 | 89 | Per Amundsen | [[/sline]] |
289 | 88 | Per Amundsen | [[/sockaccept]] |
290 | 1 | Per Amundsen | [[/sockclose]] |
291 | [[/socklist]] |
||
292 | 85 | Per Amundsen | [[/socklisten]] |
293 | 84 | Per Amundsen | [[/sockmark]] |
294 | 82 | Per Amundsen | [[/sockopen]] |
295 | 80 | Per Amundsen | [[/sockpause]] |
296 | 79 | Per Amundsen | [[/sockread]] |
297 | 1 | Per Amundsen | [[/sockrename]] |
298 | [[/sockudp]] |
||
299 | [[/sockwrite]] |
||
300 | *[[/sop]]* |
||
301 | [[/splay]] |
||
302 | 184 | Per Amundsen | |^. *[[/statusbar]]* |
303 | [[/switchbar]] |
||
304 | 183 | Per Amundsen | *[[/tab]]* |
305 | 179 | Per Amundsen | *[[/themes]]* |
306 | 176 | Per Amundsen | [[/time]] |
307 | 175 | Per Amundsen | [[/timestamp]] |
308 | 174 | Per Amundsen | [[/timer]] |
309 | 173 | Per Amundsen | [[/tip]] |
310 | 171 | Per Amundsen | [[/tips]] |
311 | 172 | Per Amundsen | [[/titlebar]] |
312 | 169 | Per Amundsen | [[/tokenize]] |
313 | 168 | Per Amundsen | [[/toolbar]] |
314 | 167 | Per Amundsen | [[/topic]] |
315 | 164 | Per Amundsen | *[[/topicbox]]* |
316 | 160 | Per Amundsen | [[/treebar]] |
317 | 149 | Per Amundsen | [[/ulist]] |
318 | 148 | Per Amundsen | *[[/usernick]]* |
319 | 145 | Per Amundsen | *[[/txt2bin]]* |
320 | 128 | Per Amundsen | *[[/unban]]* |
321 | 127 | Per Amundsen | *[[/unignore]]* |
322 | 126 | Per Amundsen | [[/unload]] |
323 | 124 | Per Amundsen | *[[/unnotify]]* |
324 | 123 | Per Amundsen | [[/unset]] |
325 | 122 | Per Amundsen | [[/unsetall]] |
326 | *[[/update]]* |
||
327 | 135 | Per Amundsen | [[/updatenl]] |
328 | 129 | Per Amundsen | [[/url]] |
329 | 118 | Per Amundsen | [[/uwho]] |
330 | 98 | Per Amundsen | [[/var]] |
331 | 96 | Per Amundsen | *[[/vars]]* |
332 | 95 | Per Amundsen | *[[/viewlog]]* |
333 | 94 | Per Amundsen | *[[/voice]]* |
334 | 91 | Per Amundsen | [[/vol]] |
335 | 90 | Per Amundsen | *[[/wdown]]* |
336 | 89 | Per Amundsen | [[/while]] |
337 | 88 | Per Amundsen | [[/window]] |
338 | 87 | Per Amundsen | *[[/wjump]]* |
339 | 1 | Per Amundsen | *[[/wnext]]* |
340 | *[[/wpause]]* |
||
341 | *[[/wplay]]* |
||
342 | 84 | Per Amundsen | *[[/wprev]]* |
343 | 82 | Per Amundsen | [[/write]] |
344 | 1 | Per Amundsen | [[/writeini]] |
345 | *[[/wsearch]]* |
||
346 | 79 | Per Amundsen | *[[/wseekf]]* |
347 | 184 | Per Amundsen | |^. *[[/wseekr]]* |
348 | *[[/wselect]]* |
||
349 | 183 | Per Amundsen | *[[/wstop]]* |
350 | 180 | Per Amundsen | *[[/wup]]* |
351 | 176 | Per Amundsen | *[[/zip]]* |
352 | 162 | Mr. BS | | |
353 | |||
354 | %(acounter) % |
||
355 | 1 | Per Amundsen | |
356 | 150 | Per Amundsen | h2. System information Commands |
357 | 16 | Per Amundsen | |
358 | Output from these are set in [[Options_Dialog|Options]] -> [[Sysinfo Options|Sysinfo]] and are merely convenient aliases. |
||
359 | 1 | Per Amundsen | |
360 | 31 | Per Amundsen | /sysinfo |
361 | 1 | Per Amundsen | /gfxinfo |
362 | /cpuinfo |
||
363 | /meminfo |
||
364 | /diskinfo |
||
365 | /audioinfo |
||
366 | /uptime |
||
367 | 150 | Per Amundsen | /bw |
368 | 1 | Per Amundsen | |
369 | 138 | Per Amundsen | h2. Missing Commands |
370 | 1 | Per Amundsen | |
371 | /creq |
||
372 | /dccserver |
||
373 | 166 | Per Amundsen | /drawsize |
374 | 1 | Per Amundsen | /dqwindow |
375 | 185 | Per Amundsen | /finger |
376 | 1 | Per Amundsen | /flood |
377 | /flush |
||
378 | /fserve |
||
379 | /ghide |
||
380 | /gload |
||
381 | 185 | Per Amundsen | /gmove |
382 | 1 | Per Amundsen | /gopts |
383 | /gplay |
||
384 | /gpoint |
||
385 | /gqreq |
||
386 | /gshow |
||
387 | /gsize |
||
388 | 119 | Per Amundsen | /gstop |
389 | 1 | Per Amundsen | /gtalk |
390 | /gunload |
||
391 | 178 | Per Amundsen | /ialclear |
392 | 30 | Per Amundsen | /links |
393 | 1 | Per Amundsen | /localinfo |
394 | /pdcc |
||
395 | /playctrl |
||
396 | /pop |
||
397 | /protect |
||
398 | /pvoice |
||
399 | /qme |
||
400 | /qmsg |
||
401 | 185 | Per Amundsen | /registration |
402 | 1 | Per Amundsen | /save |
403 | /sound |
||
404 | /speak |
||
405 | /sreq |
||
406 | /strip |
||
407 | /tnick |
||
408 | /tray |
||
409 | /vcadd |
||
410 | /vcmd |
||
411 | /vcrem |
||
412 | 185 | Per Amundsen | /vmsg |
413 | /vnotice |
||
414 | 1 | Per Amundsen | /winhelp |
415 | 185 | Per Amundsen | /wallchops |
416 | /wallvoices |
||
417 | 1 | Per Amundsen | |
418 | 150 | Per Amundsen | h2. Command prefixes |
419 | |||
420 | /! prefix will execute the internal command, even if there is a alias with the same name. |
||
421 | |||
422 | Example: |
||
423 | |||
424 | <pre> |
||
425 | ; Override the /me command, |
||
426 | alias me { |
||
427 | ; use the /! prefix to call the internal command. |
||
428 | /!me $1- |
||
429 | } |
||
430 | </pre> |
||
431 | |||
432 | /. prefix can be used to silence the output from many command. |
||
433 | |||
434 | Example: |
||
435 | |||
436 | <pre> |
||
437 | 155 | Per Amundsen | /.msg #channel This message will be hidden from your client, but still sent to the server. |
438 | 150 | Per Amundsen | </pre> |
439 | |||
440 | Both prefix's can be used at the same time. |
||
441 | |||
442 | Example: |
||
443 | |||
444 | <pre> |
||
445 | 155 | Per Amundsen | /!.msg #channel This message will be hidden from your client, but still sent to the server. |
446 | 150 | Per Amundsen | </pre> |
447 | |||
448 | 186 | Per Amundsen | /!& prefix allows delaying evaluation of the last parameter if the parameter is a %variable, this allows using consecutive spaces in commands such as [[/me]] and ][/msg]]. (AdiIRC only) |
449 | |||
450 | Example: |
||
451 | |||
452 | <pre> |
||
453 | ; Put a double spaced text inside the variable '%s'. |
||
454 | //var %s test $chr(32) $chr(32) test |
||
455 | |||
456 | ; Call the /msg command using the /!& prefix to delay the evaluation of '%s'. |
||
457 | /!&msg # %s |
||
458 | </pre> |
||
459 | |||
460 | 150 | Per Amundsen | h2. Evaluate identifiers from Editbox |
461 | 105 | Per Amundsen | |
462 | 156 | Per Amundsen | Typing a command in the Editbox with double slashes// will evaluate [[Scripting Identifiers|$identifiers]] in the line before running it. |
463 | 105 | Per Amundsen | E.g //echo -ag My nick is $me |
464 | |||
465 | 156 | Per Amundsen | You can also [[tabcomplete]] [[Scripting Identifiers|$identifiers]] manually using $me<tab>. |
466 | 107 | Per Amundsen | |
467 | 151 | Per Amundsen | h2. Creating a new command |
468 | 107 | Per Amundsen | |
469 | 112 | Per Amundsen | You can create a new command by opening the menu Tools -> Edit Aliases. |
470 | 107 | Per Amundsen | |
471 | 108 | Per Amundsen | The format for the command is <command> <script to execute>. |
472 | 107 | Per Amundsen | |
473 | *Example* |
||
474 | |||
475 | <pre> |
||
476 | 108 | Per Amundsen | ; Creates a new command '/p' which will evaluate and then execute the script '/part $chan'. |
477 | 1 | Per Amundsen | /p /part $chan |
478 | 108 | Per Amundsen | </pre> |
479 | |||
480 | 110 | Per Amundsen | You can also add a command from the script editor, the syntax there is alias <command> <script to execute> |
481 | 108 | Per Amundsen | |
482 | *Example* |
||
483 | |||
484 | <pre> |
||
485 | ; Creates a new command '/p' which will evaluate and then execute the script '/part $chan'. |
||
486 | ; Same as previous example. |
||
487 | alias p /part $chan |
||
488 | </pre> |
||
489 | |||
490 | 111 | Per Amundsen | If you want to use scripts with multiple lines, you can enclose them with {} brackets in both Edit Aliases and Script Editor. |
491 | 108 | Per Amundsen | |
492 | *Example* |
||
493 | <pre> |
||
494 | ; Edit Aliases |
||
495 | 109 | Per Amundsen | /p { |
496 | 108 | Per Amundsen | /echo -ag I am parting $chan |
497 | /part $chan |
||
498 | } |
||
499 | |||
500 | ; Script editor |
||
501 | alias p { |
||
502 | /echo -ag I am parting $chan |
||
503 | /part $chan |
||
504 | } |
||
505 | </pre> |
||
506 | |||
507 | Almost all built-in commands can be overridden to execute your own script. |
||
508 | |||
509 | *Example* |
||
510 | |||
511 | <pre> |
||
512 | ; Create your own /part command |
||
513 | alias part { |
||
514 | /echo -ag I am parting $chan |
||
515 | raw PART $chan |
||
516 | } |
||
517 | |||
518 | 114 | Per Amundsen | ; Create your own /part command, but execute the built-in /part command after executing your own script. |
519 | 108 | Per Amundsen | alias part { |
520 | /echo -ag I am parting $chan |
||
521 | |||
522 | ; Execute the built-in part command |
||
523 | !part $chan |
||
524 | } |
||
525 | 107 | Per Amundsen | </pre> |
526 | 113 | Per Amundsen | |
527 | A command can also be called as a $identifier. |
||
528 | |||
529 | *Example* |
||
530 | |||
531 | <pre> |
||
532 | ; Create a command. |
||
533 | alias mycommand { |
||
534 | 115 | Per Amundsen | echo -ag I was called as a $iif($isid,identifier,command) |
535 | 113 | Per Amundsen | } |
536 | |||
537 | ; Call the command as identifier. |
||
538 | //noop $mycommand |
||
539 | |||
540 | 116 | Per Amundsen | ; Call the command as a command. |
541 | 113 | Per Amundsen | /mycommand |
542 | </pre> |