First, second, etc. word

Old posts that have not been replied to for several years.
Locked
G
Gatekeeper-97

Post by Gatekeeper-97 »

As I said in my earlier psot I've done alot mirc scripting. This time I wounder if there is something like $1 $2 $3 etc.
ie.
if ($1 == Moo) <-- mIRC
if {$1 == Moo} <-- How do I make that possible?

Thanx for all your help
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Each bind has certain parameters. For msg, msgm, pub, and pubm, the last one ($text) is what the person said. Use normal Tcl commands like "split" and "lindex" to get at each word.

Note: don't use lindex directly on the string. Use split to turn it into a list first:

set words [split $text]
set word1 [lindex $words 0]
set word2 [lindex $words 1]
etc
Locked