|
Joined: Dec 2002
Posts: 1,527
Hoopy frood
|
OP
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
|
|
|
|
Joined: Dec 2002
Posts: 1,527
Hoopy frood
|
OP
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
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
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
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: alias clr return $rgb( [ $hget(nicklist,$1) ] )
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Dec 2002
Posts: 699
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 699 |
You don't need the hash table alias clr return $color($color($1))
|
|
|
|
Joined: Jan 2003
Posts: 148
Vogon poet
|
Vogon poet
Joined: Jan 2003
Posts: 148 |
Is it possible to change colors in dialogs without dll`s?
|
|
|
|
Joined: Dec 2002
Posts: 699
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 699 |
If you mean text/background colors, Nope.
|
|
|
|
Joined: Dec 2002
Posts: 1,527
Hoopy frood
|
OP
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
|
|
|
|
Joined: Dec 2002
Posts: 699
Fjord artisan
|
Fjord artisan
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)
|
|
|
|
Joined: Dec 2002
Posts: 1,527
Hoopy frood
|
OP
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
|
|
|
|
Joined: Dec 2002
Posts: 699
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 699 |
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 smile](/images/graemlins/mirc/smile.gif) The second result is what mdx is expecting.
|
|
|
|
Joined: Dec 2002
Posts: 1,527
Hoopy frood
|
OP
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
|
|
|
|
Joined: Dec 2002
Posts: 699
Fjord artisan
|
Fjord artisan
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
|
|
|
|
Joined: Dec 2002
Posts: 1,527
Hoopy frood
|
OP
Hoopy frood
Joined: Dec 2002
Posts: 1,527 |
well damn wish i woulda knew this all before ... hahaha ty again nimue
D3m0nnet.com
|
|
|
|
|