mIRC Home    About    Download    Register    News    Help

Print Thread
A
adama
adama
A
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?

C
captain_comic
captain_comic
C
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.
A
adama
adama
A
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.
A
Aenei
Aenei
A
What code have you come up with thus far?

C
captain_comic
captain_comic
C
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,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
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

A
adama
adama
A
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