mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2006
Posts: 5
A
adama Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Jan 2006
Posts: 5
im using this to relay text that starts with a colored text ABC in it from 1 channel to another

on *:TEXT:*ABC*:#chan1:{
msg #chan2 $1-
}

but what i would like to do is strip the ABC out of the text being echoed. only to display the text after ABC.any1 can help?

Joined: Oct 2004
Posts: 72
C
Babel fish
Offline
Babel fish
C
Joined: Oct 2004
Posts: 72
look at /help $remove
maybe you should include the colorcodes to prevent other abc's to be removed

Last edited by captain_comic; 07/01/06 09:15 PM.
Joined: Jan 2006
Posts: 5
A
adama Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Jan 2006
Posts: 5
could you give me an example of using the $remove with color code with my script? sorry just started looking at mirc scripting recently, looked at help but i think im messing up somewhere.

Last edited by adama; 07/01/06 09:54 PM.
Joined: Nov 2005
Posts: 42
A
Ameglian cow
Offline
Ameglian cow
A
Joined: Nov 2005
Posts: 42
What code have you come up with thus far?

Joined: Oct 2004
Posts: 72
C
Babel fish
Offline
Babel fish
C
Joined: Oct 2004
Posts: 72
Suppose you put ABC in your room with red on white (color code 4,0) and after that black foreground (color code 1). This is what you can do then:

on *:TEXT:*ABC*:#chan1: {
msg #chan2 $remove($1-, 4 $+ $chr(44) $+ 0abc1)
}

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
 on *:text:*abc*:#chan1:{
.msg #chan2 $gettok($strip($1-,c),2-,32))
}
 


Takes the entry, then strips any colour codes from it, then returns all but the first word

Joined: Jan 2006
Posts: 5
A
adama Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Jan 2006
Posts: 5
Thank you , worked like a charm!

i was having trouble with how to enter the color codes in a script, just needed ur example, i thought it was same for how you change text when chatting.

Thanks again


Link Copied to Clipboard