Difference between revisions of "$1-"

From Scriptwiki
Jump to: navigation, search
 
m
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:Remote Identifiers]]
 
[[Category:Remote Identifiers]]
  
You can use the $1, $2 ... $N to refer to N'th parameter in string. You can also use $N- to refer parameters from N forward and $N-$M to refer to parameters from N to M.
+
You can use the $1, $2 ... $N to refer to N'th parameter in string. You can also use $N- to refer parameters from N forward and $N-M to refer to parameters from N to M.
  
 
== Examples ==
 
== Examples ==
Line 7: Line 7:
 
In [[aliases]] $1- starts from the first word after the call of alias.
 
In [[aliases]] $1- starts from the first word after the call of alias.
  
  alias shout [[msg]] [[$active]] HALLO: i just said $1-
+
  alias shout [[describe]] [[$active]] is shouting: $1-
  
 
Usage: /shout i like milk.
 
Usage: /shout i like milk.
  
Usage in [[events]] is simple the same.
+
In [[:Category:Events|events]] $1- is the text line.
  
  [[On_text|on *:text]]:#mirc:!repeat *:{ msg [[$chan]] $2- }
+
  [[On_text|on *:text]]:#mirc:!repeat *:{ msg [[$chan]] $2-4 }
  
 
$1 would refer to word !repeat.
 
$1 would refer to word !repeat.
Line 20: Line 20:
  
 
* [[$0]]
 
* [[$0]]
 +
 +
{{Author|Tovrleaf}}
  
 
[[Category:Remote Identifiers]]
 
[[Category:Remote Identifiers]]

Latest revision as of 23:04, 3 September 2010


You can use the $1, $2 ... $N to refer to N'th parameter in string. You can also use $N- to refer parameters from N forward and $N-M to refer to parameters from N to M.

Examples

In aliases $1- starts from the first word after the call of alias.

alias shout describe $active is shouting: $1-

Usage: /shout i like milk.

In events $1- is the text line.

on *:text:#mirc:!repeat *:{ msg $chan $2-4 }

$1 would refer to word !repeat.

See Also

Contributed by Tovrleaf