| View previous topic :: View next topic |
| Author |
Message |
Balkanac Voice
Joined: 15 Aug 2005 Posts: 12
|
Posted: Fri Sep 16, 2005 12:00 pm Post subject: Radio, Auto-Post to Channel |
|
|
//Edit:
How I can put an other colour into the text?
| Code: | set radio_url "http://discopink.ch/sc_text2.php"
set time 1
set chan "#RadioPink"
if {![info exists ald]} {
set ald 1
timer $time radio_get
}
proc radio_get {} {
global radio_url
global thetext a chan time text
set file [open "|lynx -source $radio_url" r]
set html "[gets $file]"
regsub -all "<br>" $html " " html
regsub -all "<html>" $html " " html
regsub -all "<font color=#333333>" $html " " html
regsub -all "</font>" $html " " html
regsub -all "<\[^b]{0,1}b{0,1}>" $html "" html
regsub "text1=" $html "" html
regsub "NOW PLAYING:" $html "Now on http://viptrend.com:8002/listen.pls playing \002" html
putchan $chan $html
putserv "privmsg $chan Radio: http://viptrend.com:8002/listen.pls"
timer $time radio_get
} |
|
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Fri Sep 16, 2005 12:58 pm Post subject: |
|
|
Have you checked Colour and formatting codes from the Tcl FAQ? _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Fri Sep 16, 2005 1:04 pm Post subject: |
|
|
- don't use lynx, use http package
- you can embed mIRC colors in output text using the color escape character \003; check mIRC's docs for color code combinations; for example, this would be red on yellow:
| Code: |
putserv "privmsg #channel :\0034,8using colors on irc is lame\003"
|
_________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|