mIRC Home    About    Download    Register    News    Help

Print Thread
#204969 08/10/08 01:49 AM
Joined: Nov 2006
Posts: 7
G
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Nov 2006
Posts: 7
Can anyone help me with some code to strip the font code from mIRC please?



S Georgia;#000 general text


Last edited by Geordie_No9; 08/10/08 02:49 AM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Without knowing just where you're getting that information from, my best guess is to suggest that you use the .font property with the $window(N/@name) identifier.

RusselB #204971 08/10/08 02:43 AM
Joined: Nov 2006
Posts: 7
G
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Nov 2006
Posts: 7
That info is from the channel window in mIRC when somoene types 'general text' within the same channel using a web based front end Chat server.

i want it to disply simply the text 'general text' instead of the font/style code which the web based server is adding to the text.

I know i need something like the code below but that code is incorrect.

Code:
alias sfont { return $regsubex($1-,/S .+/i,1) } 


USE: 

on ^*:TEXT:*:#:{ 
 echo -t $chan [ $nick ] $sfont($1-) 
  haltdef 
}

Last edited by Geordie_No9; 08/10/08 02:49 AM.
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Try this:

Code:
alias sfont { return $regsubex($1-,/\[style.+\](.+)\[/style\]/i,\1) | halt } 
on ^*:TEXT:*:#:{ echo -t $chan [ $nick ] $chr(58) $sfont($1-) | haltdef }

Tomao #204988 08/10/08 07:47 PM
Joined: Nov 2006
Posts: 7
G
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Nov 2006
Posts: 7
nope that just seemed to rip everything lol

there is no [style in the font code just simply

S Georgia;#000 general text

or

S Latha;#993333 testing

depending on the font and color chosen.

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
What chat network is your original code for?

Tomao #205012 09/10/08 08:46 AM
Joined: Nov 2006
Posts: 7
G
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Nov 2006
Posts: 7

Joined: Nov 2006
Posts: 7
G
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Nov 2006
Posts: 7
i am still trying to work this out.

Joined: Nov 2006
Posts: 7
G
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Nov 2006
Posts: 7
ok ive managed to figure out how to strip the codes and send the information back to the channel window, however i dont know how to get rid of the incomming text ?

This is how it is now showing in the channel window
Originally Posted By: "channelwindow"

ÀLPhâ«»®ª : S Comic\bSans\bMS;#6600CC wb CB :D
ÀLPhâ«»®ª : wb CB :D

This is what i want it to show

ÀLPhâ«»®ª : wb CB :D

The code im using is :-
Code:
alias sfont { return $remove($1-, S ,Trebuchet\bMS;,Comic\bSans\bMS;,,Franklin\bGothic\bBook;,Microsoft\bSans\bSerif;,Tahoma;,#FF0000,#000066,#6600CC,#0000CC,#0099FF,#660000  ) | halt } 
on ^*:TEXT:*:#:{ echo -t $chan [ $nick ] $chr(58) $sfont($1-) | haltdef }

Obviously i will need to add the rest of the fonts and the rest of the HTML color codes to omit those aswell, if anyone has a quicker way in doing this it would be helpfull as there are over 150 colors.

But my main concern at the minute is getting rid of the auto inputed first line in the channel window.


Last edited by Geordie_No9; 23/10/08 11:28 AM.

Link Copied to Clipboard