$1- » History » Revision 3
Revision 2 (Per Amundsen, 01/04/2017 11:58 AM) → Revision 3/5 (Per Amundsen, 12/11/2018 07:30 PM)
_Added in 1.9.0_
*$1-$N*
Returns a range of tokens associated with current script.
You can use $N- to refer to parameters N and onward, and $N-M to refer to token $N through to $M.
To refer to a whole line, you would use $1-.
_See also [[/tokenize]]._
_Can be prefixed with # to ensure the resulted text starts with a channel prefix._
*Example*
<pre>
on *:TEXT:*:*:Number of tokens in the incoming message is $0 first token is $1 all tokens is $1-
alias Example {
; Tokenize the string 'a,b,c,d.
/tokenize 44 a,b,c,d
; Print number of tokens.
echo -ag Number of tokens is $0 first token is $1 all tokens is $1-
}
; $1 can be combined with regular text without using $+.
; NB If your text contains a number, AdiIRC skips every character in your text up to the last number and uses the remaining text.
alias Example {
; Tokenize the string 'a,b,c,d.
/tokenize 32 abcd
; Prints 'abcde'.
echo -ag Combined text is $1-e
}
</pre>