|
Joined: Dec 2002
Posts: 230
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2002
Posts: 230 |
At the moment, there is no simple way to simulate the default mIRC nickname coloring when modifying the on text or on action event, even though there are various identifiers which relate to nickname coloring. We came to the conclusion in this thread. The main problem is that $nick($chan,$nick).color returns the "default text" color when a nickname does not match any entry in the colors list. This messes up the "action" color in on action events aswell as highlight colors etc.. If it would just return $null, it would not be a problem. I hope there will soon be a solution for this, because it really can't be that I can't even have the same nickname coloring in my theme engine than there is in normal mIRC.
|
|
|
|
Ecronika
|
Ecronika
|
I am currently using this alias : alias -l _cnick {
var %j $cnick(0),%i 0,%p $nick($2,$1).pnick
while (%i < %j) {
inc %i
if ($cnick(%i).method == 2) continue
if (($cnick(%i) != $null) && ($v1 !iswm $1)) continue
if ($2) {
if (($cnick(%i).modes != $null) && (!$regex(%p,$+(^[,$_regfix($v1),]+.*$)))) continue
if (($cnick(%i).anymode) && (!$cnick(%i).nomode) && (%p == $1)) continue
if (($cnick(%i).nomode) && (!$cnick(%i).anymode) && (%p != $1)) continue
;The Idle-Setting seems to be crap since idle=0 when a new message appears
;I will have to think about that option again
if (($cnick(%i).idle) && ($calc($nick($2,$1).idle / 60) < $v1)) continue
}
else return $_ddcolor($iif($cnick(%i).color != $color(normal),$+(,$v1,$1,),$1))
return $_ddcolor($iif($cnick(%i).color != $color(normal),$+(,$v1),))
}
if (!$2) return $1
}
Usage : $_cnick(Nick,[#Chan]) It is not the perfect Solution but it works on my theme Engine quite well. You may also look at it @ mirc.net
|
|
|
|
Joined: Dec 2002
Posts: 230
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2002
Posts: 230 |
Thanks, this looks pretty slow though
|
|
|
|
Leoric
|
Leoric
|
there is missing an alias _regfix, isn't?
|
|
|
|
Joined: Nov 2003
Posts: 2,321
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,321 |
|
|
|
|
Joined: Dec 2002
Posts: 787
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 787 |
I hate to mention it, but just because, it doesnt work exactly how you think it should, isn't really justification to say 'io! khaled change this cuz it doesnt work like i want it to'.
In addition doing so would most likely kill scripts written in previous mIRC versions, but then nevermind..
Also, the script posted above is 'slow' in terms of, being several milliseconds slower than alternatives, not really noticable unless your a machine.
Eamonn.
|
|
|
|
Joined: Dec 2002
Posts: 230
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2002
Posts: 230 |
Coolkill, I don't say the identifier has to work like I want it to. It's merely a suggestion. I suggest you to skip the suggestions forum if you can't bear with that.
I'd just rather have default mIRC nickcolors with one small identifier than 100 lines of code. I also don't care if Khaled makes up a new identifier for this (or a $nick property) if he's worried about breaking older scripts. It should also be really easy to implement, since the code is already there.
Also, if you use the above identifier, I am willing to bet that it IS noticeable if you are on a slow machine or many channels with lots of traffic. Not everyone has a 3GHz machine, and everyone knows that mIRC script isn't the fastest language ever created. Many people keep mIRC opened while playing 3D games or the like, and processing intensive scripts may cause stutter/hiccups in some situations. That's why I want an easier solution.
No offense.
|
|
|
|
Joined: Dec 2002
Posts: 787
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 787 |
I couldn't see it being 100 lines, but i suppose its a point that perhaps there should be a built-in method of determining (sp?) what you want, although saying that, doubt it would be a 'flag' for such a thing, and similiarily i wouldnt have thought it would be a new identifier just for that purpose, suppose its upto Khaled as you said.
Also, 3D games + any other program = yuck - although i suppose it depends on your system, though saying that this is a 1.6Ghz, 512mb machine and i still even kill Explorer before playing games.
Eamonn.
|
|
|
|
Ecronika
|
Ecronika
|
Sorry, here are the missing aliases : alias -l _regfix { return $replacex($1-,.,\.,\,\\,|,\|,$chr(123),$+(\,$chr(123)),$&
$chr(125),$+(\,$chr(125)),$chr(91),$+(\,$chr(91)),$chr(93),$+(\,$chr(93)))
}
alias -l _ddcolor {
var %r = /(?<=\x03\d\d,|\x03\d,|\x03)(\d)(?!\d)/g
!.echo -q $regsub($1,%r,0\1,%r)
return %r
}
|
|
|
|
Ecronika
|
Ecronika
|
Scripts will always be slower than mIRC itself but i tried to optimise it as far as i can. In fact i use it myself using 7 cnick-entrys and it is not noticeable for me (using a 1.2 Ghz Athlon machine on WinXP).
|
|
|
|
katsklaw
|
katsklaw
|
Completely off topic, but perhaps you should invest in a graphic accelerator card that has more on board memory or more RAM. I usually run 30+ processes including 2-3 copies of IE, mIRC, OutLook Express and several others like Window Blinds, huge wallpaper, Object Dock and a few other apps and all my games run fine .. including Doom 3.
Athlon 2.2Ghz, 1Gig RAM, 128MB Vid RAM Athlon 1.4Ghz, 1.25Gig RAM, 64MB Vid RAM
XP Pro SP2.
|
|
|
|
Joined: Dec 2002
Posts: 230
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2002
Posts: 230 |
In case you were replying to me, I wasn't talking about myself in this case. I also run firefox, mirc, and various other apps while playing and don't experience any problems either.
|
|
|
|
|