Difference between revisions of "Set"

From Scriptwiki
Jump to: navigation, search
 
Line 3: Line 3:
 
<table>
 
<table>
 
<tr><td><b>Switch</b></td><td><b>Meaning</b></td></tr>
 
<tr><td><b>Switch</b></td><td><b>Meaning</b></td></tr>
<tr><td>s</td><td>Gives an output: * Set <%var> to <value>.</td></tr>
+
<tr><td>s</td><td>Gives an output: * Set %var to value.</td></tr>
 
<tr><td>n</td><td>Treats value as plain text.</td></tr>
 
<tr><td>n</td><td>Treats value as plain text.</td></tr>
 
<tr><td>z</td><td>Decreases %var until it reaches zero and then unsets it.</td></tr>
 
<tr><td>z</td><td>Decreases %var until it reaches zero and then unsets it.</td></tr>

Revision as of 16:47, 11 September 2005

Sets the value of %var to the specified value.

/set [-snzuN] <%var> [value]
SwitchMeaning
sGives an output: * Set %var to value.
nTreats value as plain text.
zDecreases %var until it reaches zero and then unsets it.
uNUnsets %var after N seconds, as long as %var isn't set again. If N is 0, it is unset when script finishes.

Example

/set -u3 %fuu bar

This will set %fuu to bar and unset it after 3 seconds.

/set -s %fuu 3

This will set %fuu to 3 and give an output to the active window: * Set %fuu to 3

See Also

/unset unsets a variable.
/var sets a local variable.
/unsetall unsets all variable from the variable list.