samooh_2003 Posted October 31, 2006 Report Share Posted October 31, 2006 i tried this to get the link in my script as web chat blue one with under line but i faced problem small one but i cant solve it with this so hope to find it here as usual var %linkmessage $wildtok($1-,http://*,1,32) | echo -t # 8(-Owner-) 2 $nick $+ : $replace($1-,%linkmessage,12 %linkmessage ) i am using show users color and working pretty with me but with this one when some one paste any link the color becomes ok before the link and i got the link with underline and blue color but the next words after the link become black not the color for that user i tried it from mirc with normal words as my name is sameh for ( name is ) with red color and after is i closed the red color then the my and sameh words back to my old color so any idea abt this plz ?! sorry if i couldn't explain well Link to comment Share on other sites More sharing options...
takaharu_ Posted October 31, 2006 Report Share Posted October 31, 2006 (edited) Took me a while to find this again but I got there in the end: alias url.find { var %n = $wildtok($1-,http*,0,32), %i = 1, %e = $1- while (%n >= %i) { var %x = $wildtok(%e,http*,%i,32) var %y = $chr(3) $+ 12 $+ $chr(31) $+ %x $+ $chr(15) $+ $iif(* iswm %e,$left(%e,1) $+ $left(%e,2),$null) var %e = $replace(%e,%x,%y) inc %i } var %n = $wildtok(%e,www.*,0,32), %i = 1 while (%n >= %i) { var %x = $wildtok(%e,www.*,%i,32) var %y = $chr(3) $+ 12 $+ $chr(31) $+ %x $+ $chr(15) $+ $iif(* iswm %e,$+ $left(%e,1) $+ $left(%e,2),$null) var %e = $replace(%e,%x,%y) inc %i } return %e } Hope this helps; it will colour the links and (if memory serves) retain the original formatting of the text. Takaharu: This is a test for www.tg007.net URLs. You would use it in a similar way to this: on *:text:*:#:{ echo -a $url.find($1-) } Edited October 31, 2006 by takaharu_ Link to comment Share on other sites More sharing options...
samooh_2003 Posted October 31, 2006 Author Report Share Posted October 31, 2006 thx alot for u takaharu_ but the same ,this time i got the words after da link with white color not black only so hope to know wt this may be from , thx again for u waittin reply from u or from anyone can help Link to comment Share on other sites More sharing options...
Guest X-Fusion Posted October 31, 2006 Report Share Posted October 31, 2006 You'll have to change the color in the actual alias .. alias url.find { var %n = $wildtok($1-,http*,0,32), %i = 1, %e = $1- while (%n >= %i) { var %x = $wildtok(%e,http*,%i,32) var %y = $chr(3) $+ 12 $+ $chr(31) $+ %x $+ $chr(15) $+ $iif(* iswm %e,$left(%e,1) $+ $left(%e,2),$null) var %e = $replace(%e,%x,%y) inc %i } var %n = $wildtok(%e,www.*,0,32), %i = 1 while (%n >= %i) { var %x = $wildtok(%e,www.*,%i,32) var %y = $chr(3) $+ 12 $+ $chr(31) $+ %x $+ $chr(15) $+ $iif(* iswm %e,$+ $left(%e,1) $+ $left(%e,2),$null) var %e = $replace(%e,%x,%y) inc %i } return 12 $+ %e $+ } Something like that might work. I dunno, its 9:00 am, I just got home from work, and I'm tired. Link to comment Share on other sites More sharing options...
samooh_2003 Posted November 1, 2006 Author Report Share Posted November 1, 2006 not working Link to comment Share on other sites More sharing options...
samooh_2003 Posted November 1, 2006 Author Report Share Posted November 1, 2006 No more ideas ? Link to comment Share on other sites More sharing options...
takaharu_ Posted November 1, 2006 Report Share Posted November 1, 2006 (edited) I tried out the code I posted just to make sure: //echo -a 4Testing for www.TG007.net URLs. It worked fine; all of the text was red apart from the URL, which was blue and underlined. Edited November 1, 2006 by takaharu_ Link to comment Share on other sites More sharing options...
Guest X-Fusion Posted November 1, 2006 Report Share Posted November 1, 2006 Just tried it to, works fine for me. Maybe your not echoing right? Link to comment Share on other sites More sharing options...
samooh_2003 Posted November 2, 2006 Author Report Share Posted November 2, 2006 (edited) ok now if some one type a link in the room i should make it lik this on ^*:TEXT:*:#: { echo -a $nick : $url.find($1-) } ?? Edited November 2, 2006 by samooh_2003 Link to comment Share on other sites More sharing options...
Guest X-Fusion Posted November 2, 2006 Report Share Posted November 2, 2006 Well, why would you use echo -a? That would echo any text to your active channel. What if you were in 4 rooms? Try echo $chan. And, if you have another theme, implement it into that. That might be your problem .. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now