Set » History » Version 7
Per Amundsen, 08/13/2015 10:27 AM
1 | 1 | Per Amundsen | _Added in 1.8.8_ |
---|---|---|---|
2 | |||
3 | 5 | Per Amundsen | */set [-eklnsuNz] <%var> [value]* |
4 | 1 | Per Amundsen | |
5 | Sets the value of %var to the specified value. |
||
6 | |||
7 | *Switches* |
||
8 | |||
9 | -e - Unset the variable when AdiIRC exists. |
||
10 | -k - Keeps the unset time (-u) from a previous command. |
||
11 | -l - Creates a local variable instead of global. |
||
12 | -n - Treat the value as plain text, even if arithmetic operators are used. |
||
13 | -s - Display variable assignment value. |
||
14 | -uN - Unsets the variable after N amount of seconds. |
||
15 | -z - Decreases the value of the variable by 1/second until zero is reached. At zero the variable will be unset. |
||
16 | |||
17 | *Parameters* |
||
18 | |||
19 | <%var> - The variable to set. |
||
20 | 7 | Per Amundsen | [value] - Value to set the variable to. (can be a single [[Arithmetic Operators|arithmetic expression]]) |
21 | 1 | Per Amundsen | |
22 | *Example* |
||
23 | |||
24 | 6 | Per Amundsen | <pre> |
25 | 1 | Per Amundsen | alias example { |
26 | ;Create a variable and set a value. |
||
27 | /set %var Countdown: |
||
28 | |||
29 | ;Print the value |
||
30 | /echo -a %var |
||
31 | |||
32 | ;Set the value to 3, decrease once per second |
||
33 | /set -zs %var 3 |
||
34 | } |
||
35 | 6 | Per Amundsen | </pre> |