Project

General

Profile

Set » History » Revision 11

Revision 10 (Per Amundsen, 05/24/2017 01:04 PM) → Revision 11/23 (Per Amundsen, 09/29/2017 09:36 PM)

_Added in 1.8.8_ 

 */set [-eklnsuNz] <%var> [value]* 

 Sets the value of %var to the specified value. 

 *Switches* 

 -e - Unset the variable when AdiIRC exits. 
 -k - Keeps the unset time (-u) from a previous command. 
 -l - Creates a local variable instead of global. 
 -n - Treat the value as plain text, even if arithmetic operators are used. 
 -s - Display variable assignment value. 
 -uN - Unsets the variable after N amount of seconds, if N = 0 unset the variable after the script is finished. 
 -z - Decreases the value of the variable by 1/ever second until zero is reached. At zero the variable will be unset. 
 -i - TODO 

 *Parameters* 

 <%var> - The variable to set. 
 [value] - Value to set the variable to. (can be a single [[Arithmetic Operators|arithmetic expression]]) 

 *Example* 

 <pre> 
 alias example { 
   ;Create a variable and set a value. 
   /set %var Countdown: 

   ;Print the value 
   /echo -a %var 

   ;Set the value to 3, decrease once per second 
   /set -zs %var 3 
 } 
 </pre>