mIRC Home    About    Download    Register    News    Help

Print Thread
how to split text up #138623 04/01/06 12:34 AM
Joined: Jul 2005
Posts: 37
G
gans Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Jul 2005
Posts: 37
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

Re: how to split text up #138624 04/01/06 01:15 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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

Re: how to split text up #138625 04/01/06 01:26 AM
Joined: Jul 2005
Posts: 37
G
gans Offline OP
Ameglian cow
OP Offline
Ameglian cow
G
Joined: Jul 2005
Posts: 37
thanks that works nice :P