mIRC Homepage

how to split text up

Posted By: gans

how to split text up - 04/01/06 12:34 AM

hi im trying to do sumthing like $gettok what im doing is on a trigger event if text with :and>the>rest to get picked up im also trying to do it the outher way aswell like

!trigger blah blah: hfhjgjg

make it set it to blah blah only and make it do anouther set with hfhjgjg
thanks in advance
Posted By: RusselB

Re: how to split text up - 04/01/06 01:15 AM

Example code only
Code:
 on *:text:!*:#:{
var %commands = $numtok($1-,58), %command = 1
while %command <= %commands {
set $+(%,command,.,%command) $gettok($1-,%command,58)
inc %command
}
}
 

That will give you each of your "commands" in separate variables
First command will be in %command.1
Second command will be in %command.2
Third command will be in %command.3
and so on

Each command will have to be separated by the : (colon) character
Posted By: gans

Re: how to split text up - 04/01/06 01:26 AM

thanks that works nice :P
© 2020 mIRC Discussion Forums