$sw

Returns the value of a switch for an alias
Syntax

$sw(<letter>)

Description
This function is valid and useful only in aliases. It allows an alias to handle switches just like any other KVIrc command. If a switch in the form -<letter> was passed to the current alias then $sw(<letter>) returns 1 (true). If a switch in the form -<letter>=<value> was passed to the current alias then <value> is returned. If the switch was not present at all then this function returns an empty string (that evaluates to false in an expression). A warning is printed if this function is used non-alias code.
Examples
alias(test){     if($sw(a))echo "Switch -a was passed"     %x = $sw(x);     if(%x)echo "Switch -x=%x was passed" } test -a test -x test -a -x test -a -x=test test -a=10 -x=test

Index, Functions
KVIrc 3.2.0 Documentation
Generated by kris at Thu Mar 9 22:26:47 2006