mIRC Home    About    Download    Register    News    Help

Print Thread
#20022 19/04/03 12:05 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
ok im having a slight problem making the font color in my dialog changable thru the colors setup

this is what ive tried so far

did -i $dname 1 1 settxt color %ncl

on connect im taking and setting a variable called %ncl like

set %ncl $+($,rgb,( $+ $rgb($color(listboxtext)) $+ ),)

the variable is setting all fine and everything but still it will not set the font color accordingly ..... infact it changes to the default color of black ..... basically like its not even reading it ...... so im having a lil trouble understand how to get over this ...... whether i need to go and use hash tables to run it so it processes fast enough .... any help would be greatly appreciated

OK alil UPDATE

tried the hash tables and it still doesnt read the rbg correctly ..... it just wont set the font color thru that

any other suggestions would be greatly appreciated

Last edited by _D3m0n_; 19/04/03 01:11 AM.

D3m0nnet.com
#20023 19/04/03 03:20 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
ok to anyone else working on a nicklist and trying to colorize font and have it selectable ..... ive come up with a way to do it so that it works using mdx color settings

here is an alias i had to make to get the rgb value to set correctly
Code:
alias clr { return $rgb($gettok($hget(nicklist,$1),1,44),$gettok($hget(nicklist,$1),2,44),$gettok($hget(nicklist,$1),3,44)) }


which i used like this to retrieve the color variable in the hashtable like this

did -i $dname 1 1 settxt color $rg(fontcolor)




D3m0nnet.com
#20024 19/04/03 07:47 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
You could use evaluation brackets to 'pre-evaluate' $hget(), so that the commas in there are considered parameter separators for $rgb:
Code:
alias clr return $rgb( [ $hget(nicklist,$1) ] )


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#20025 19/04/03 08:56 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
You don't need the hash table
Code:
alias clr return $color($color($1))

#20026 19/04/03 09:44 AM
Joined: Jan 2003
Posts: 148
K
Vogon poet
Offline
Vogon poet
K
Joined: Jan 2003
Posts: 148
Is it possible to change colors in dialogs without dll`s?

#20027 19/04/03 09:53 AM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
If you mean text/background colors, Nope. frown

#20028 19/04/03 02:23 PM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
i tried that suggestion also before finding out that didnt work for me ..... ended up using the color.dll to set a color to hash table then hsaving and hloading on respective start and exit
then used the other alias ..... ty for the suggestion

and to everyone also ty for your input


D3m0nnet.com
#20029 19/04/03 02:48 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
"set %ncl $+($,rgb,( $+ $rgb($color(listboxtext)) $+ ),)"
Perhaps this is why it wouldn't work for you. That should be: $color(listbox text)

e.g. dll mdx/mdx.dll SetColor $dname 1 text $clr(editbox text)

#20030 19/04/03 03:09 PM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
actually that was a typo in my post to here ..... i did have it correctly in the script i was working on and still no go ... ive not done much with hashtables in the past and i do like the way it works now ........ altho i dont know why mirc wouldnt evaluate the rgb normaly as to set the color to a set color rather than a changable color the code is

did -i $dname 1 1 settxt color $rgb(#,#,#)

under the init dialog setting
thats why it was giving me so much trouble even trying to use it like

did -i $dname 1 1 settxt color $rgb($color(listbox text))

i cant understand why it wouldnt evalute it properly

ive actually tried several combinations and yes the couple u and the other poster had suggested probably would have worked ..... but i had already come up with a solution by using the other means and it also worked correctly for me so i left it at that ...... im slowly trying to learn more and more as the next task i wanna work on is a treeview for the channels and networks ....... i think that will be probably the hardest task ive got coming ..... again i thank you for your help ....

altho i do wish there was something inside of mirc to halt its processing of a script ...... ive tried that pause snippet thats been floating around and it just doesnt do the trick in some cases .......


D3m0nnet.com
#20031 19/04/03 03:16 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Quote:
did -i $dname 1 1 settxt color $rgb($color(listbox text))

i cant understand why it wouldnt evalute it properly
The easiest way to explain that is...
//echo -a $rgb($color(action))
//echo -a $color($color(action))

See the difference? smile The second result is what mdx is expecting.

#20032 19/04/03 04:47 PM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
then why does

did -i $dname 1 1 settxt color $rgb(#,#,#)

work with no problem at all?


D3m0nnet.com
#20033 19/04/03 05:05 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
//echo -a $rgb(156,0,156)
10223772

//echo -a $rgb($color(action))
6,0,0
$color(action) returns 6, $rgb(6) returns 6,0,0 - which is not the RGB value for that color, and is not in the format mdx expects either.

//echo -a $color($color(action))
10223772
$color(action) returns 6, $color(6) returns 10223772

#20034 19/04/03 08:11 PM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline OP
Hoopy frood
OP Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
well damn wish i woulda knew this all before ... hahaha ty again nimue


D3m0nnet.com

Link Copied to Clipboard