Scripting Commands » History » Version 192
Per Amundsen, 02/03/2020 10:51 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 | 188 | Per Amundsen | [[/creq]] |
87 | 1 | Per Amundsen | [[/ctcp]] |
88 | [[/ctcps]] |
||
89 | 57 | Per Amundsen | [[/ctcpreply]] |
90 | 158 | Per Amundsen | *[[/cycleall]]* |
91 | 54 | Per Amundsen | [[/dcc]] |
92 | 52 | Per Amundsen | [[/dde]] |
93 | 41 | Per Amundsen | [[/ddeserver]] |
94 | [[/debug]] |
||
95 | 32 | Per Amundsen | [[/dec]] |
96 | 27 | Per Amundsen | *[[/dehalfop]]* |
97 | *[[/deop]]* |
||
98 | 1 | Per Amundsen | [[/describe]] |
99 | 27 | Per Amundsen | *[[/desop]]* |
100 | *[[/devoice]]* |
||
101 | 1 | Per Amundsen | [[/dialog]] |
102 | [[/did]] |
||
103 | [[/didtok]] |
||
104 | [[/disable]] |
||
105 | [[/disconnect]] |
||
106 | 94 | Per Amundsen | [[/dlevel]] |
107 | 1 | Per Amundsen | [[/dline]] |
108 | [[/dll]] |
||
109 | [[/dns]] |
||
110 | 27 | Per Amundsen | *[[/dock]]* |
111 | *[[/dockpanels]]* |
||
112 | 128 | Per Amundsen | *[[/download]]* |
113 | 1 | Per Amundsen | [[/drawcopy]] |
114 | [[/drawdot]] |
||
115 | [[/drawfill]] |
||
116 | [[/drawline]] |
||
117 | [[/drawpic]] |
||
118 | [[/drawrect]] |
||
119 | [[/drawreplace]] |
||
120 | [[/drawrot]] |
||
121 | [[/drawsave]] |
||
122 | 188 | Per Amundsen | | [[/drawscroll]] |
123 | 189 | Per Amundsen | [[/drawsize]] |
124 | 188 | Per Amundsen | [[/drawtext]] |
125 | 136 | Per Amundsen | [[/ebeeps]] |
126 | 172 | Per Amundsen | [[/echo]] |
127 | 145 | Per Amundsen | *[[/echomonitor]]* |
128 | 123 | Per Amundsen | *[[/echox]]* |
129 | 97 | Per Amundsen | *[[/edit]]* |
130 | 94 | Per Amundsen | [[/editbox]] |
131 | 84 | Per Amundsen | [[/else]] |
132 | 74 | Per Amundsen | [[/elseif]] |
133 | 88 | Per Amundsen | [[/emailaddr]] |
134 | 66 | Per Amundsen | [[/enable]] |
135 | 1 | Per Amundsen | *[[/encoding]]* |
136 | [[/events]] |
||
137 | [[/exit]] |
||
138 | 60 | Per Amundsen | *[[/fakeraw]]* |
139 | 57 | Per Amundsen | [[/fclose]] |
140 | 144 | Per Amundsen | *[[/fget]]* |
141 | 54 | Per Amundsen | [[/filter]] |
142 | 52 | Per Amundsen | [[/findtext]] |
143 | 160 | Per Amundsen | [[/firewall]] |
144 | 50 | Per Amundsen | [[/flash]] |
145 | 1 | Per Amundsen | [[/flist]] |
146 | [[/flushini]] |
||
147 | 67 | Per Amundsen | [[/font]] |
148 | 124 | Per Amundsen | [[/fopen]] |
149 | 39 | Per Amundsen | [[/fseek]] |
150 | 144 | Per Amundsen | [[/fsend]] |
151 | 85 | Per Amundsen | [[/fullname]] |
152 | 45 | Per Amundsen | *[[/fullscreen]]* |
153 | 174 | Per Amundsen | [[/fupdate]] |
154 | 36 | Per Amundsen | [[/fwrite]] |
155 | 33 | Per Amundsen | *[[/gcmem]]* |
156 | 167 | Per Amundsen | *[[/globalkeys]]* |
157 | 32 | Per Amundsen | *[[/google]]* |
158 | 23 | Per Amundsen | [[/goto]] |
159 | 143 | Per Amundsen | [[/groups]] |
160 | 77 | Per Amundsen | [[/guser]] |
161 | 1 | Per Amundsen | [[/hadd]] |
162 | 27 | Per Amundsen | *[[/halfop]]* |
163 | 1 | Per Amundsen | [[/halt]] |
164 | [[/haltdef]] |
||
165 | [[/hdec]] |
||
166 | [[/hdel]] |
||
167 | 189 | Per Amundsen | | [[/help]] |
168 | [[/hfree]] |
||
169 | 188 | Per Amundsen | *[[/highlight]]* |
170 | 174 | Per Amundsen | [[/hinc]] |
171 | 1 | Per Amundsen | [[/hload]] |
172 | 172 | Per Amundsen | [[/hmake]] |
173 | 167 | Per Amundsen | [[/hop]] |
174 | 160 | Per Amundsen | [[/hotlink]] |
175 | 157 | Per Amundsen | [[/hsave]] |
176 | 183 | Per Amundsen | [[/ial]] |
177 | 184 | Per Amundsen | [[/ialfill]] |
178 | 145 | Per Amundsen | [[/ialmark]] |
179 | 1 | Per Amundsen | [[/identd]] |
180 | 128 | Per Amundsen | *[[/icon]]* |
181 | 140 | Per Amundsen | [[/if]] |
182 | 124 | Per Amundsen | [[/ignore]] |
183 | 123 | Per Amundsen | [[/iline]] |
184 | 122 | Per Amundsen | [[/inc]] |
185 | 141 | Per Amundsen | *[[/inick]]* |
186 | 175 | Per Amundsen | *[[/inlineimage]]* |
187 | 96 | Per Amundsen | [[/invite]] |
188 | 94 | Per Amundsen | [[/iuser]] |
189 | 89 | Per Amundsen | [[/join]] |
190 | 168 | Per Amundsen | *[[/kblayout]]* |
191 | 88 | Per Amundsen | [[/kick]] |
192 | 85 | Per Amundsen | [[/kill]] |
193 | 84 | Per Amundsen | *[[/lag]]* |
194 | 126 | Per Amundsen | [[/leave]] |
195 | 149 | Per Amundsen | *[[/linemarker]]* |
196 | 78 | Per Amundsen | [[/linesep]] |
197 | 77 | Per Amundsen | [[/list]] |
198 | 74 | Per Amundsen | [[/load]] |
199 | 67 | Per Amundsen | [[/loadbuf]] |
200 | 66 | Per Amundsen | *[[/lock]]* |
201 | 130 | Per Amundsen | [[/log]] |
202 | 1 | Per Amundsen | *[[/logs]]* |
203 | [[/logview]] |
||
204 | [[/markall]] |
||
205 | 69 | Per Amundsen | [[/mdi]] |
206 | 57 | Per Amundsen | [[/me]] |
207 | 1 | Per Amundsen | [[/menubar]] |
208 | [[/mkdir]] |
||
209 | [[/mnick]] |
||
210 | 50 | Per Amundsen | [[/mode]] |
211 | 1 | Per Amundsen | [[/msg]] |
212 | 189 | Per Amundsen | | *[[/msgbox]]* |
213 | *[[/mute]]* |
||
214 | 188 | Per Amundsen | *[[/nextunread]]* |
215 | 184 | Per Amundsen | [[/nick]] |
216 | 183 | Per Amundsen | *[[/nickcolumn]]* |
217 | 182 | Per Amundsen | *[[/nicklist]]* |
218 | 174 | Per Amundsen | *[[/nmsg]]* |
219 | 171 | Per Amundsen | [[/noop]] |
220 | 172 | Per Amundsen | [[/notice]] |
221 | 168 | Per Amundsen | [[/notify]] |
222 | 167 | Per Amundsen | *[[/np]]* |
223 | 160 | Per Amundsen | *[[/oline]]* |
224 | 149 | Per Amundsen | [[/omsg]] |
225 | 145 | Per Amundsen | [[/onotice]] |
226 | 132 | Per Amundsen | [[/op]] |
227 | 130 | Per Amundsen | *[[/options]]* |
228 | 128 | Per Amundsen | [[/parseline]] |
229 | 126 | Per Amundsen | [[/part]] |
230 | 125 | Per Amundsen | [[/partall]] |
231 | 123 | Per Amundsen | *[[/paths]]* |
232 | 169 | Per Amundsen | *[[/pause]]* |
233 | 122 | Per Amundsen | [[/perform]] |
234 | 121 | Per Amundsen | *[[/pgoogle]]* |
235 | 118 | Per Amundsen | *[[/plugins]]* |
236 | 176 | Per Amundsen | [[/play]] |
237 | 191 | Per Amundsen | [[/playctrl]] |
238 | 99 | Per Amundsen | *[[/priv]]* |
239 | 137 | Per Amundsen | [[/proxy]] |
240 | 96 | Per Amundsen | [[/query]] |
241 | 95 | Per Amundsen | [[/queryrn]] |
242 | 94 | Per Amundsen | *[[/quickconnect]]* |
243 | 89 | Per Amundsen | *[[/quicksave]]* |
244 | 88 | Per Amundsen | [[/quit]] |
245 | 1 | Per Amundsen | [[/quote]] |
246 | 85 | Per Amundsen | [[/raw]] |
247 | 84 | Per Amundsen | *[[/rawx]]* |
248 | *[[/rawlog]]* |
||
249 | 85 | Per Amundsen | *[[/realname]]* |
250 | 77 | Per Amundsen | *[[/reconnect]]* |
251 | 173 | Per Amundsen | *[[/refreshsong]]* |
252 | 1 | Per Amundsen | *[[/rejoin]]* |
253 | [[/reload]] |
||
254 | 67 | Per Amundsen | [[/remini]] |
255 | 66 | Per Amundsen | [[/remote]] |
256 | 1 | Per Amundsen | [[/remove]] |
257 | 191 | Per Amundsen | |^. [[/rename]] |
258 | [[/renwin]] |
||
259 | 189 | Per Amundsen | [[/reseterror]] |
260 | 188 | Per Amundsen | [[/resetidle]] |
261 | 184 | Per Amundsen | *[[/resolve]]* |
262 | 183 | Per Amundsen | *[[/restart]]* |
263 | 176 | Per Amundsen | [[/return]] |
264 | 175 | Per Amundsen | [[/returnex]] |
265 | 174 | Per Amundsen | [[/rlevel]] |
266 | 173 | Per Amundsen | [[/rline]] |
267 | 171 | Per Amundsen | [[/rmdir]] |
268 | 172 | Per Amundsen | [[/run]] |
269 | 169 | Per Amundsen | [[/ruser]] |
270 | 168 | Per Amundsen | [[/say]] |
271 | 167 | Per Amundsen | [[/savebuf]] |
272 | 160 | Per Amundsen | [[/saveini]] |
273 | 149 | Per Amundsen | [[/scid]] |
274 | 145 | Per Amundsen | [[/scon]] |
275 | 132 | Per Amundsen | *[[/scripts]]* |
276 | 164 | Per Amundsen | *[[/scrolltext]]* |
277 | 130 | Per Amundsen | *[[/search]]* |
278 | 179 | Per Amundsen | *[[/sendkeys]]* |
279 | 128 | Per Amundsen | [[/server]] |
280 | 126 | Per Amundsen | *[[/serverlist]]* |
281 | 124 | Per Amundsen | [[/set]] |
282 | 123 | Per Amundsen | *[[/setconfig]]* |
283 | 122 | Per Amundsen | [[/setlayer]] |
284 | 123 | Per Amundsen | *[[/setoption]]* |
285 | *[[/showadiirc]]* |
||
286 | 148 | Per Amundsen | *[[/showmenu]]* |
287 | 98 | Per Amundsen | [[/showmirc]] |
288 | 96 | Per Amundsen | [[/signal]] |
289 | 95 | Per Amundsen | *[[/slap]]* |
290 | 94 | Per Amundsen | *[[/sleep]]* |
291 | 89 | Per Amundsen | [[/sline]] |
292 | 88 | Per Amundsen | [[/sockaccept]] |
293 | 1 | Per Amundsen | [[/sockclose]] |
294 | [[/socklist]] |
||
295 | [[/socklisten]] |
||
296 | [[/sockmark]] |
||
297 | 84 | Per Amundsen | [[/sockopen]] |
298 | 82 | Per Amundsen | [[/sockpause]] |
299 | 1 | Per Amundsen | [[/sockread]] |
300 | 79 | Per Amundsen | [[/sockrename]] |
301 | 1 | Per Amundsen | [[/sockudp]] |
302 | 191 | Per Amundsen | |^. [[/sockwrite]] |
303 | *[[/sop]]* |
||
304 | 189 | Per Amundsen | [[/splay]] |
305 | 188 | Per Amundsen | [[/sreq]] |
306 | *[[/statusbar]]* |
||
307 | 184 | Per Amundsen | [[/switchbar]] |
308 | 183 | Per Amundsen | *[[/tab]]* |
309 | 179 | Per Amundsen | *[[/themes]]* |
310 | 176 | Per Amundsen | [[/time]] |
311 | 175 | Per Amundsen | [[/timestamp]] |
312 | 174 | Per Amundsen | [[/timer]] |
313 | 173 | Per Amundsen | [[/tip]] |
314 | 171 | Per Amundsen | [[/tips]] |
315 | 172 | Per Amundsen | [[/titlebar]] |
316 | 169 | Per Amundsen | [[/tokenize]] |
317 | 168 | Per Amundsen | [[/toolbar]] |
318 | 167 | Per Amundsen | [[/topic]] |
319 | 164 | Per Amundsen | *[[/topicbox]]* |
320 | 160 | Per Amundsen | [[/treebar]] |
321 | 149 | Per Amundsen | [[/ulist]] |
322 | 148 | Per Amundsen | *[[/usernick]]* |
323 | 145 | Per Amundsen | *[[/txt2bin]]* |
324 | 128 | Per Amundsen | *[[/unban]]* |
325 | 127 | Per Amundsen | *[[/unignore]]* |
326 | 126 | Per Amundsen | [[/unload]] |
327 | 124 | Per Amundsen | *[[/unnotify]]* |
328 | 123 | Per Amundsen | [[/unset]] |
329 | 122 | Per Amundsen | [[/unsetall]] |
330 | *[[/update]]* |
||
331 | 135 | Per Amundsen | [[/updatenl]] |
332 | 129 | Per Amundsen | [[/url]] |
333 | 118 | Per Amundsen | [[/uwho]] |
334 | 98 | Per Amundsen | [[/var]] |
335 | 96 | Per Amundsen | *[[/vars]]* |
336 | 95 | Per Amundsen | *[[/viewlog]]* |
337 | 91 | Per Amundsen | *[[/voice]]* |
338 | 1 | Per Amundsen | [[/vol]] |
339 | *[[/wdown]]* |
||
340 | 89 | Per Amundsen | [[/while]] |
341 | 88 | Per Amundsen | [[/window]] |
342 | 1 | Per Amundsen | *[[/wjump]]* |
343 | *[[/wnext]]* |
||
344 | *[[/wpause]]* |
||
345 | *[[/wplay]]* |
||
346 | 84 | Per Amundsen | *[[/wprev]]* |
347 | 191 | Per Amundsen | |^. [[/write]] |
348 | [[/writeini]] |
||
349 | 189 | Per Amundsen | *[[/wsearch]]* |
350 | 79 | Per Amundsen | *[[/wseekf]]* |
351 | 188 | Per Amundsen | *[[/wseekr]]* |
352 | 184 | Per Amundsen | *[[/wselect]]* |
353 | 183 | Per Amundsen | *[[/wstop]]* |
354 | 180 | Per Amundsen | *[[/wup]]* |
355 | 176 | Per Amundsen | *[[/zip]]* |
356 | 162 | Mr. BS | | |
357 | |||
358 | %(acounter) % |
||
359 | 1 | Per Amundsen | |
360 | 150 | Per Amundsen | h2. System information Commands |
361 | 16 | Per Amundsen | |
362 | 1 | Per Amundsen | Output from these are set in [[Options_Dialog|Options]] -> [[Sysinfo Options|Sysinfo]] and are merely convenient aliases. |
363 | 31 | Per Amundsen | |
364 | 1 | Per Amundsen | /sysinfo |
365 | /gfxinfo |
||
366 | /cpuinfo |
||
367 | /meminfo |
||
368 | /diskinfo |
||
369 | /audioinfo |
||
370 | 150 | Per Amundsen | /uptime |
371 | 1 | Per Amundsen | /bw |
372 | 138 | Per Amundsen | |
373 | 1 | Per Amundsen | h2. Missing Commands |
374 | |||
375 | /dccserver |
||
376 | /dqwindow |
||
377 | 185 | Per Amundsen | /finger |
378 | 1 | Per Amundsen | /flood |
379 | /flush |
||
380 | /fserve |
||
381 | /ghide |
||
382 | /gload |
||
383 | 185 | Per Amundsen | /gmove |
384 | 1 | Per Amundsen | /gopts |
385 | /gplay |
||
386 | /gpoint |
||
387 | /gqreq |
||
388 | /gshow |
||
389 | /gsize |
||
390 | 119 | Per Amundsen | /gstop |
391 | 1 | Per Amundsen | /gtalk |
392 | /gunload |
||
393 | 30 | Per Amundsen | /ialclear |
394 | 1 | Per Amundsen | /links |
395 | /localinfo |
||
396 | /pdcc |
||
397 | /pop |
||
398 | /protect |
||
399 | /pvoice |
||
400 | /qme |
||
401 | 185 | Per Amundsen | /qmsg |
402 | 1 | Per Amundsen | /registration |
403 | /save |
||
404 | /sound |
||
405 | /speak |
||
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 | 187 | 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 | 186 | Per Amundsen | |
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> |