Project

General

Profile

Set » History » Version 14

Per Amundsen, 12/29/2018 09:24 AM

1 1 Per Amundsen
_Added in 1.8.8_
2
3 14 Per Amundsen
*/set [-eklnsuNzgp] <%var> [value]*
4 1 Per Amundsen
5
Sets the value of %var to the specified value.
6
7
*Switches*
8
9 8 Mr. BS
-e - Unset the variable when AdiIRC exits.
10 1 Per Amundsen
-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 9 Per Amundsen
-uN - Unsets the variable after N amount of seconds, if N = 0 unset the variable after the script is finished.
15 10 Per Amundsen
-z - Decreases the value of the variable by 1/ever second until zero is reached. At zero the variable will be unset.
16 1 Per Amundsen
-i - Initializes a variable only if it does not already exist as a local or global variable.
17
-g - Sets a global variable even if a local variable exists.
18 14 Per Amundsen
-p - Permits value to be 2 literal double quotes and permits value to end with a single [[$chr]](32) space. Also enables -n switch behavior.
19 1 Per Amundsen
20
*Parameters*
21
22
<%var> - The variable to set.
23 7 Per Amundsen
[value] - Value to set the variable to. (can be a single [[Arithmetic Operators|arithmetic expression]])
24 1 Per Amundsen
25
*Example*
26
27 6 Per Amundsen
<pre>
28 1 Per Amundsen
alias example {
29
  ;Create a variable and set a value.
30
  /set %var Countdown:
31
32
  ;Print the value
33
  /echo -a %var
34
35
  ;Set the value to 3, decrease once per second
36
  /set -zs %var 3
37
}
38 6 Per Amundsen
</pre>