mIRC Home    About    Download    Register    News    Help

Print Thread
How to set a range of words from $text #269123 21/06/21 12:23 PM
Joined: May 2021
Posts: 3
ComputerTech Offline OP
Self-satisfied door
OP Offline
Self-satisfied door
Joined: May 2021
Posts: 3
Is it possible to set say variable %foo with the first word of $text?


ComputerTech
Re: How to set a range of words from $text [Re: ComputerTech] #269124 21/06/21 05:01 PM
Joined: Feb 2003
Posts: 2,773
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,773
There is no identifier $text

You can get the first word of event text by using $1

You can get all of the event text by using $1- or $parms or $eventparms

You can specify other words (parameters) and ranges in similar ways.

var %foo = $1
var %foo = $gettok($1-,1,32)
var %foo = $gettok($parms,1,32)
var %foo = $gettok($eventparms,1,32)

var %foo = $2-6
var %foo = $gettok($1-,2-6,32)
var %foo = $gettok($parms,2-6,32)
var %foo = $gettok($eventparms,2-6,32)


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: How to set a range of words from $text [Re: Raccoon] #269125 21/06/21 05:07 PM
Joined: May 2021
Posts: 3
ComputerTech Offline OP
Self-satisfied door
OP Offline
Self-satisfied door
Joined: May 2021
Posts: 3
Awesome! thank you Raccoon smile


ComputerTech