This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Problem using Colors in TCL Script

Old posts that have not been replied to for several years.
Locked
D
DeLiRiUm

Problem using Colors in TCL Script

Post by DeLiRiUm »

I've wrote a little script that Responds on an Text. Now I tried to use Colors as shown in the 'Tutorial' in this Forum. But the Color doesn't show, the text is Plain. I'm using mIRC 6.03

Here is the code of the script:

Code: Select all

bind pub - !regeln rulez
set act_chan #onlineglueck
proc rulez {nick uhost hand chan text} {

	global act_chan

	if {$chan != $act_chan} {
		return 0
	}

	putserv "privmsg $chan :\002\00304,00(\002\003 Regeln \002\00304,00»\002\003 den Operatoranweisungen ist Folge zu leisten - \003Verboten\003: Spamm - Flood (Smileyfloods) - Werbung - Pornographie - CyberSex - Beleidigungen - Caps-Lock - neue Channels - Scripte - Nickänderungen entgegen des 100%igen www.onlineglueck.de Nicks \002\00304,00)\002\003"

	return 1
}
thanx in advance

DeLiRiUm
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I do see that you don't open and close the bold and colour corectly.. here is an example on how to open and close for one:

Code: Select all

\002\00304bla\003\002 bla bla bla \002\00304something\003\002"
Once the game is over, the king and the pawn go back in the same box.
D
DeLiRiUm

Post by DeLiRiUm »

Hmm. That doesn't work for me. I've now used

Code: Select all

\002\00304(\002\003
Wich should produce an red bracket, but it just doesn't
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

DeLiRiUm wrote:Hmm. That doesn't work for me. I've now used

Code: Select all

\002\00304(\002\003
Wich should produce an red bracket, but it just doesn't
Then what do you see? Do you see colors in messages made by other clients than your egg?
D
Darkj
Halfop
Posts: 86
Joined: Sun Jul 06, 2003 9:58 pm

Post by Darkj »

Shouldn't it be /0034?
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Darkj wrote:Shouldn't it be /0034?
No. What gave you that idea? :o
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

or simply copy & paste the char that mirc's &co ctrl-k / ctrl-b produce...

so you can test the output in mirc first
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Copy and paste of the actual control character is nasty and can break some editors. Some FTP clients do not like it either.

First off, the order in which you open and close control chars is not important. Lazy parsing is at hand here, which is actualy good as there is little to parse. The control chars simply set the start and stop points of formatting.

In other words, tag order is un-important unlike HTML.

If the control chars are failing, then there is one of two issues at hand.

1: You client is filtering them out as you have asked it to in the settings.

2: You client does not support them, however, is aware of them, so filters them for good reading.

Are you normaly able to see them when somebody else sends you a message?

Has your network got colour filtering enabled? Does a client need to auth to use them? Does it need a specific usermode to stop them being filtered?
D
Darkj
Halfop
Posts: 86
Joined: Sun Jul 06, 2003 9:58 pm

Post by Darkj »

I use color code 4 alot in my code, and the way I use it is /0034, and it works fine.
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Darkj wrote:I use color code 4 alot in my code, and the way I use it is /0034, and it works fine.

Code: Select all

\0034 text \003 
that should work you had the "" the other way "/"
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
D
Darkj
Halfop
Posts: 86
Joined: Sun Jul 06, 2003 9:58 pm

Post by Darkj »

Oh duh, my bad.
D
DeLiRiUm

Post by DeLiRiUm »

For some Reason it now works. Thanks to all of you.

Felix
Locked