mIRC Home    About    Download    Register    News    Help

Print Thread
#98777 26/09/04 02:20 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I have a litle problem with colors in echo.. i made like a theme, it echo all messages on the channel to me with another style then mirc it self does.. the problem i have is that i use colors like: $chr(3) $+ $color(own text) .. now that works fine.. but if i want to type somthing in color in the channel: 4text . just as an example, then the theme wont return to the default color, it will go black, the  sign halt all colors.. smirk any way i can get a echo that ignore if i insert a  in the message? just doing the same as mirc do.. $chr(3) $+ $color(own text) text4colored textsame as $color(own text) ... hope you understand what i mean.. :tongue:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#98778 26/09/04 07:50 PM
Joined: Aug 2003
Posts: 314
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
When you echo, use the own text color: //echo $color(own) -a text here so that when you use ctrl+o or an ending color code it will return to using that particular color rather than the normal text color

#98779 26/09/04 08:32 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
how would i solve that ?`now it show:

< nick > own color text colored text black text
i want it to be..
< nick > own color text colored text own color text

so i want to force it to go back to $color(own text) when the colored text i typed is halted with the color char 


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#98780 26/09/04 09:24 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Like Sigh said, using Ctrl + O in an /echo will return to it's default color, set in the command:

/echo 12 * Hi [color:Red]04there, John![/color]
/echo 3 * This is a [color:blue]12test[/color]


The color numbers in bold are the echo's default color. Every text that is not being modified by another color code will return the default's color.

Zyzzyx smile


"All we are saying is give peace a chance" -- John Lennon
#98781 27/09/04 02:01 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
nope. add  "ctrl + o" will halt all colors, even the color set with $color(own text), the code looks like..
Code:
echo -a %tstmp $+ $chr(3) $+ %cbrackets $+ %right $+ $chr(3) $+ $chr(3) $+ %opcolor @ $+ $chr(3) $+ $chr(3) $+ $color(own text) $+ $me $chr(3) $+ %cbrackets $+ %left $+ $chr(3) $+ $chr(3) $+ $color(own text) %inptext | .msg $active %inptext | halt

%tstmp = time stamp
%cbrackets = color of brackets
%right = right chr.. for its < as a test
%opcolor = color of @ sign
$color(own text) = blue
%inptext = the text i typed..

this is my on 1:INPUT:*: {
added ctrl + o infront of %inptext didnt work
or did i missunderstand you? :tongue:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#98782 27/09/04 04:33 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
When I say the "echo's default color" (it's not an official name, I just call it that way) I mean the color you use in the command before the flags.

/echo [color] [-cdeghiNtsaqlbfnmr] [color name] [#channel|[=]nick] <text>
Prints text in the specified window using the specified color (0 to 15).

I took the above from the help file. If you specify a [color] (0 to 15), all the text that is not modified by other Ctrl + K codes will appeas with [color].
Note that it goes between the /echo and it's flags, if any. In this case, the Ctrl + O will return to [color] instead of the usual black (unless you don't specify a color at all).
Code:
echo [color:red]$color(own text)[/color] -a %tstmp $+ $chr(3) $+ %cbrackets $+ %right $+ $chr(3) $+ $chr(3) $+ %opcolor @ [color:green]Ctrl + O[/color] $+ $me $chr(3) $+ %cbrackets $+ %left [color:green]Ctrl + O[/color] %inptext | .msg $active %inptext | halt
If I interpreted your code right, the above your work.

Zyzzyx smile


"All we are saying is give peace a chance" -- John Lennon
#98783 27/09/04 05:19 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
nope, still dont work :tongue:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#98784 27/09/04 06:29 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
I tried over here and had no problems:

(I used random colors, but they worked fine).
%cbrackets 04
%right <
%left >
%opcolor 03
%inptext Hi there!
Code:
/echo $color(own text) -at $chr(3) $+ %cbrackets $+ %right $+ $chr(3) $+ $chr(3) $+ %opcolor $+ @ $+ $chr(3) $+ $chr(3) $+  $+ $me $+ $chr(3) $+ %cbrackets $+ %left $+ $chr(3) $+ $chr(3) $+  %inptext
On the above I just added a couple of $+ more. The char  represents Ctrl + O.

Result:

Btw, I think there are a couple of extra $chr(3) there, but they dont affect the echo.


"All we are saying is give peace a chance" -- John Lennon
#98785 27/09/04 06:59 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
thnx.. i had one $+ to may.. blush


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#98786 27/09/04 07:39 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Cool, glad it works! smile


"All we are saying is give peace a chance" -- John Lennon

Link Copied to Clipboard