|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
i have a lil problem in how mdx shows dialog: this is the code, code in RED should be vital, can anyone tell me how to fix it ? i have last mdx made
on *:dialog:Themes:init:0:{
dll $mircdirsystem\dlls\mdx.dll MarkDialog $dname
dll $mircdirsystem\dlls\mdx.dll SetMircVersion $version
dll $mircdirsystem\dlls\mdx.dll SetControlMDX $dname 2 ListView headerdrag report rowselect flatsb showsel nosortheader single > $views
[color:red]
did -i $dname 2 1 headerdims 130:1 110:2 90:3 200:4
did -i $dname 2 1 headertext +l 0 Theme $chr(9) +l 0 Author $chr(9) +l 0 Background $chr(9) +l 0 Description
[/color]
dll $mircdirsystem\dlls\mdx.dll SetFont $dname 2 12 1 verdana
dll $mircdirsystem\dlls\mdx.dll SetFont $dname 1 12 1 verdana
dll $mircdirsystem\dlls\mdx.dll SetFont $dname 3 12 1 verdana
...
...
}
and should be look like: this is on mirc 6.16 (no longer using 6.03 )
Last edited by raZOR; 06/04/06 12:36 AM.
IceCapped
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
Your problem might actually be that you are missing a $views aliases?
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
yes, you were right, i did missed it. thank you, very much apreciated.
IceCapped
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
not to spam new thread, why not continue here ? i shortened problem as much as i could :P anyways, picture of dialog (the last one) is seen above so it is MDX list box, i have 5 objects to select on list while 6th object are those tabs(with names) problem i got is this: this alias:
alias _loadthmfile {
tokenize 32 $1-
.load -a themes\ $+ $1 $+ .dom
}
should READ from that listbox and according to 1st field (theme name), should load file with exact name so if it is clicked on BLACK theme, it should read from 1st field the name Black, and thru this alias load Black.dom now this code below should (i guess) mark the line on list box what is selected....
_loadthmfile $did(themes,2,$did(themes,2).sel)
so i ask anyone who knows MDX, is this last code (above) correct for last MDX version ? coz when i click on the selected line in dialog and try to load a file, instead names (Black, White, Asure etc... whatever name is) it wont load file of same name (Black.dom, White.dom) etc... but it tries to load based on OBJECT number, so in this case if Black is last on list, it would be object 6 and it tries to load 6.dom and not Black.dom (by name) .... long and confusing thread no? :P but i myself can't figure out this coz i dont know mdx well so i ask any hint possible.
Last edited by raZOR; 06/04/06 12:24 PM.
IceCapped
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
anyways, picture of dialog (the last one) is seen above so it is MDX list box, i have 5 objects to select on list while 6th object are those tabs(with names) problem i got is this:
alias _loadthmfile {
tokenize 32 $1-
.load -a themes\ $+ $1 $+ .dom
}
_loadthmfile $did(themes,2,$did(themes,2).sel)
coz when i click on the selected line in dialog and try to load a file, instead names (Black, White, Asure etc... whatever name is) it wont load file of same name (Black.dom, White.dom) etc... but it tries to load based on OBJECT number, so in this case if Black is last on list, it would be object 6 and it tries to load 6.dom and not Black.dom (by name) First change "$did(themes,2,$did(themes,2,1).sel)" to "$did(themes,2,$did(themes,2 ,1).sel) .text". The "1" I added is probably not needed but it is saying that you want the first selected item. When you use "$did(themes,2,$did(themes,2).sel).text" you are getting a text line that looks like a line from your first image. That's because when you create an MDX control it doesn't change the listbox (or host control), it simply use this control to determine how the MDX control should look. $did() can not directly access the MDX control. In the alias "_loadthmfile" try "tokenize 9 $1-" or "tokenize 9 $remove($1-, $chr(32))" instead of "tokenize 32 $1-". Then use $3 to get your color.
Last edited by NaquadaServ; 06/04/06 03:59 PM.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
firstly, thank you for replying
secondly:
if i use old "tokenize 32 $1-" i get * /load: no such file 'C:\mirc\themes\.dom (obviously it cant find any name)
when i use: tokenize 9 $1 i get error * /load: no such file 'C:\mirc\themes\.dom
when i use tokenize 9 $remove($1-, $chr(32)) * /load: no such file 'C:\mirc\themes\+fs000White.dom * /load: no such file 'C:\mirc\themes\+fs000LightBlue.dom
where white or LightBlue behind +fs000 are just named backgrounds(of theme, so not theme name but just background for some alias that uses it) on listbox
where this +fs000 i have NO idea what is nor do i find it in script at all...
any random ideas ?
Last edited by raZOR; 06/04/06 04:46 PM.
IceCapped
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
if i use old "tokenize 32 $1-" i get * /load: no such file 'C:\mirc\themes\.dom (obviously it cant find any name)
when i use: tokenize 9 $1 i get error * /load: no such file 'C:\mirc\themes\.dom
when i use tokenize 9 $remove($1-, $chr(32)) * /load: no such file 'C:\mirc\themes\+fs000White.dom * /load: no such file 'C:\mirc\themes\+fs000LightBlue.dom
where white or LightBlue behind +fs000 are just named backgrounds(of theme, so not theme name but just background for some alias that uses it) on listbox
where this +fs000 i have NO idea what is nor do i find it in script at all... No problem, glad to help. +fs000 is extra options that MDX adds. Try this using "tokenize 9 $1-", after the tokenize write an echo command like "echo -a $1 : $2 : $3 : $4 : $5 : $6 : $7", to see which argument is equal to the one you want. Then use that argument instead of $1. It's probably going to be $4 or higher.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
thanks again for reply =)
now i gots this
echo: 1 +fs 0 0 0 Black : +fs 0 0 0 pRonEtIvAgO : +fs 0 0 0 Black : +fs 0 0 0 Default theme of Domination : : :
error: * /load: no such file 'C:\mirc\themes\+fs'
--------------
now 2 things puzzles me:
1. i have set it to read $3, in error it says that it reads "+fs" but according to echo, +fs is $2
2. everything between $1and $5 (so 2-4) shows: * /load: no such file 'C:\mirc\themes\+fs
everything above $4 shows: * /load: no such file 'C:\mirc\themes\.dom
so again it cannot actually find anything (weird)
any ideas ?
IceCapped
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
echo: 1 +fs 0 0 0 Black : +fs 0 0 0 pRonEtIvAgO : +fs 0 0 0 Black : +fs 0 0 0 Default theme of Domination : : :
Try this... I use tokenize twice to get at the specific word you want...
alias _loadthmfile {
tokenize 9 $1-
tokenize 32 $3
.load -a themes\ $+ $5 $+ .dom
}
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
thanks for replying again ^^ very close Naquada but a bit far hehehe echo: 1 +fs 0 0 0 Black : +fs 0 0 0 pRonEtIvAgO : +fs 0 0 0 Black : +fs 0 0 0 Default theme of Domination : : : you took second black (which i colored here in red) and i need 1st one (colored in green here) if you ask how do i know, here is list of themes (notice greened words) echo: 1 +fs 0 0 0 Black : +fs 0 0 0 pRonEtIvAgO : +fs 0 0 0 Black : +fs 0 0 0 Default theme of Domination : : : echo: 1 +fs 0 0 0 Asure : +fs 0 0 0 Raptor : +fs 0 0 0 Light Blue : +fs 0 0 0 Asure theme of Domination : : : echo: 1 +fs 0 0 0 IceCap : +fs 0 0 0 Raptor : +fs 0 0 0 Teal : +fs 0 0 0 IceCap theme of Domination : : : so i get then this errors * /load: no such file 'C:\mirc\themes\Light.dom' - * /load: no such file 'C:\mirc\themes\Teal.dom' which script tries to load :P btw i tired with $1-5 still nothing and logically $5 SHOULD be correct one... but it doesnt do it ~edit~ on the other hand with just 1 echo (i used 2 echos previous) i get this +fs : 0 : 0 : 0 : Teal : : +fs : 0 : 0 : 0 : Light : Blue : which means he cant grab firs field with true names ?
Last edited by raZOR; 06/04/06 09:13 PM.
IceCapped
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
Try this...
alias _loadthmfile {
tokenize 9 $1-
tokenize 32 $1
.load -a themes\ $+ $5 $+ .dom
}
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
Hi ! it works (just with $6) hehe
omg, i dont know how to thank you, you really helped me much !
thank you Naquada i really really apreciate it !
~also this is a bit too much to ask now. but umm are you willing to help me with another problem regarding same dialog ?
if no its ok.. just asking =)
thanks again.
Last edited by raZOR; 07/04/06 11:28 AM.
IceCapped
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
You're welcome. I might be able to help, what's the other problem???
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
reimaging if you look on right side, you see preview window, on some bizzarre irony it wont show any theme preview at all... now this code might be longish :P and clumzy (i didnt made it :tongue: just trying to make it work on new mirc)
dialog Themes {
title "Themes"
size -1 -1 263 120
icon $mircdirsystem\domin.icl, 10
option dbu
box "", 4, 4 12 256 91
box "", 9, 4 12 137 91
text "Current theme: ", 1, 4 4 40 6
text $theme(name), 3, 44 4 100 6
list 2, 5 16 134 86, size
button "&Load", 5, 205 107 27 10
button "&Close", 8, 232 107 27 10, cancel
button "&Hide", 99, 0 0 0 0, hide Ok
;text "- Preview Window -", 17, 175 8 54 6
icon 50, 142 17 116 84
}
on *:dialog:Themes:init:0:{
dll $mircdirsystem\dlls\mdx.dll MarkDialog $dname
dll $mircdirsystem\dlls\mdx.dll SetMircVersion $version
dll $mircdirsystem\dlls\mdx.dll SetControlMDX $dname 2 ListView headerdrag report rowselect flatsb showsel nosortheader single > $views
did -i $dname 2 1 headerdims 130 110 90 200
did -i $dname 2 1 headertext Theme $chr(9) Author $chr(9) Background $chr(9) Description
dll $mircdirsystem\dlls\mdx.dll SetFont $dname 2 12 1 verdana
dll $mircdirsystem\dlls\mdx.dll SetFont $dname 1 12 1 verdana
dll $mircdirsystem\dlls\mdx.dll SetFont $dname 3 12 1 verdana
var %n = 0
While (%n < $findfile(themes,*.dom,0)) {
did -a $dname 2 $calc(%x +1) $readini($findfile(themes,*.dom,$calc(%n +1)),info,name) $chr(9) $readini($findfile(themes,*.dom,$calc(%n +1)),info,author) $chr(9) $readini($findfile(themes,*.dom,$calc(%n +1)),info,background) $chr(9) $readini($findfile(themes,*.dom,$calc(%n +1)),info,description)
inc %n
}
}
on 1:dialog:themes:sclick:5: { _loadthm }
on 1:dialog:themes:sclick:2: { previewtheme }
on 1:dialog:themes:dclick:2: { _loadthm }
....
rest is not important coz its more for LOADING themes
which you fixed
in this case this should matter:
alias previewtheme {
[color:green]
;you add here your new theme preview alias
;like i said above (just for background, black, teal, green atc...)
;from where window reads some values of font, background
;to display in this preview window
[/color]
if ($gettok($did(themes,2,$did(themes,2).sel),7,32) == Black) { did -v themes 50 | preview-black }
elseif ($gettok($did(themes,2,$did(themes,2).sel),7,32) == White) { did -v themes 50 | preview-white }
elseif ($gettok($did(themes,2,$did(themes,2).sel),7,32) == Teal) { did -v themes 50 | preview-teal }
elseif ($gettok($did(themes,2,$did(themes,2).sel),7,32) == Blue) { did -v themes 50 | preview-light_blue }
else { did -v themes 50 | nopreview }
}
alias nopreview {
[color:green]
;this should be section where he cant get preview so
;as on image (above) shows "no preview aveliable"
[/color]
window -c @themes
if ($window(@themes) == $null) {
window -ph +d @themes 300 200 229 165 verdana 11
drawfill @themes 0 0 0 0
}
var %. = drawtext -p @themes 1 verdana 10 x
%. 76 01,00 $str($chr(160),7) Preview not available!
drawsave @themes themes\thmprvw.bmp
if $dialog(themes) {
did -g themes 50 themes\thmprvw.bmp
}
.remove themes\thmprvw.bmp
window -c @themes
}
here comes main part, the preview alias of each theme based on background as stated above. Here is BLACK theme example:
alias preview-black {
var %temp = $theme(name) | If (%temp == $null) { .nopreview | halt }
did -v themes 50
var %thm.file $mircdirthemes\ $+ $theme(name) $+ .dom
.unload -a %thm.file
_loadthmfile $did(themes,2,$did(themes,2).sel)
var %rgb = 0 | while (%rgb < 16) { color -r %rgb | inc %rgb }
var %temp = $readini themes\ $+ $theme(name) $+ .dom colours rgb | if (%temp != $null) { _rgb $readini themes\ $+ $theme(name) $+ .dom colours rgb }
window -c @themes
if ($window(@themes) == $null) { window -ph +d @themes 300 200 229 165 verdana 11 | drawfill @themes 1 1 1 1 }
var %. = drawtext -pb @themes 0 1 verdana 10 x
%. 4 $str($chr(160),1) $theme(joinme,#domination) $str($chr(160),7)
%. 16 $str($chr(160),1) $theme(me,$me,is choosing a theme!) $str($chr(160),7)
%. 28 $str($chr(160),1) $theme(nick,$me,Guest376705) $str($chr(160),7)
%. 40 $str($chr(160),1) $theme(notice,Nickserv,Password accepted now you can [censored] off!) $str($chr(160),7)
%. 52 $str($chr(160),1) $timestamps $+ $theme(logo) $+ $gettok($readini(system\ $+ $theme(name) $+ .dom,colours,colours),12,44) $+ Can't change Nick while you're banned $str($chr(160),7)
%. 64 $str($chr(160),1) $theme(attention,TCP Alert in port 80 (http) from $IP) $str($chr(160),7)
%. 76 $str($chr(160),1) $theme(quit,rOlling,Quit: Ping timeout) $str($chr(160),7)
%. 88 $str($chr(160),1) $theme(echoaway,Off - away time: 17s) $str($chr(160),7)
%. 100 $str($chr(160),1) $theme(joins,Raptor,domi@raptor.tech.nu) $str($chr(160),7)
%. 112 $str($chr(160),1) $theme(part,$me,id@localhost) $str($chr(160),7)
%. 124 $str($chr(160),1) $theme(metext,$me,Hi! How are you?)
%. 136 $str($chr(160),1) $theme(wsl,pRonEtIvAgO)
%. 148 $str($chr(160),1) $theme(raw311name,pRonEtIvAgO,www.domination.pt.vu)
drawsave @themes themes\thmprvw.bmp
if $dialog(themes) { did -g themes 50 themes\thmprvw.bmp }
.remove themes\thmprvw.bmp
.unload -a themes\ $+ $theme(name) $+ .dom
.load -a %thm.file
var %rgb = 0 | while (%rgb < 16) { color -r %rgb | inc %rgb }
var %temp = $readini themes\ $+ $theme(name) $+ .dom colours rgb | if (%temp != $null) { _rgb $readini themes\ $+ $theme(name) $+ .dom colours rgb }
window -c @themes
}
any help would be greatly apreciated =)
IceCapped
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
alias preview-black {
...
_loadthmfile $did(themes,2,$did(themes,2).sel)
...
}
One thing I noticed is that you are using "$did(themes,2,$did(themes,2).sel)" here too... Remember the string $did returns is formated.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
sorry for being stupid i dont understand what you meant ?
IceCapped
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
umm if you meant to replace it with _loadthmfile $did(themes,2,$did(themes,2,1).sel).text as in previous case, i have and still nothing
IceCapped
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
Not really sure what the problem is, your scripting style is confusing a bit... If you could be more specific as to the problem. Also totaly don't know what $theme is doing... Sorry for the delay, the web site's connectivity was crappy yesterday.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
dont apologyse i apreciate any help given, since not many people want to bug with this (i already asked few hehe) as for scripting style, it is not mine :P author of script abandoned script support ages ago, and i just want to make it compatible so it can run on mirc 6.16 and above using latest mdx... (which script didnt) if it was mine style i would probably fix it myself as for problem. i try to explain again: in image you see left side(list box): description of themes, name, author, background type on right side you see "preview window" when user clicks (only once) on list box name(theme) it should generate how theme should look (and it did worked on mirc 6.0x series with older mdx). so problem is now (when i added last mdx so it can run on winxp) that on click it wont generate any preview at all as for $theme, it is identifier that just reads some basic settings from theme.dom like you see in alias (up) of black theme:
$theme(part,$me,id@localhost)
it would read from theme file this:
:part | return 10Part:0 $2 10(15 $+ $replace($3,@,10@15 $+ ) $+ 10)15 has left $4
and such.. just coloring and some raw return info ---- offcourse if you are willing, and if you have time i can upload whole thing (just this theme things) for analisys if you think that would make it easier for tracking down something. i try on this board to narrow it down altho i might not be good at it :P
Last edited by raZOR; 08/04/06 01:21 PM.
IceCapped
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
These parts in preview theme would need to change...
$gettok($did(themes,2,$did(themes,2).sel),7,32) same way that _loadthm changed.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
hi i tried with
if ($gettok($did(themes,2,$did(themes,2,1).sel),7,32) == Black) { did -v themes 50 | preview-black }
if ($gettok($did(themes,2,$did(themes,2,1).sel).text,7,32) == Black) { did -v themes 50 | preview-black }
if ($gettok($did(themes,2,$did(themes,2,1).sel),7,32).text == Black) { did -v themes 50 | preview-black }
none of it worked for preview (sorry for being noob in mdx if i make it harder)
IceCapped
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
Try this...
alias previewtheme {
var %didLine | var %Part | var %Color
set %didLine $did(themes,2,$did(themes,2).sel).text
set %Part $gettok(%didLine, 1, 9)
set %Color $gettok(%Part, 1, 7)
; Place an echo command here for the sake of testing
echo -a %Color : %Part : %didLine
if (%Color == Black) { did -v themes 50 | preview-black }
elseif (%Color == White) { did -v themes 50 | preview-white }
elseif (%Color == Teal) { did -v themes 50 | preview-teal }
elseif (%Color == Blue) { did -v themes 50 | preview-light_blue }
else { did -v themes 50 | nopreview }
}
Last edited by NaquadaServ; 11/04/06 03:48 PM.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
no preview but this echo: (for black theme)
1 +fs 0 0 0 Black : 1 +fs 0 0 0 Black : 1 +fs 0 0 0 Black +fs 0 0 0 pRonEtIvAgO +fs 0 0 0 Black +fs 0 0 0 Default theme of Domination 1 +fs 0 0 0 Black : 1 +fs 0 0 0 Black : 1 +fs 0 0 0 Black +fs 0 0 0 pRonEtIvAgO +fs 0 0 0 Black +fs 0 0 0 Default theme of Domination
IceCapped
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
sorry, typed that wrong, try this...
alias previewtheme {
var %didLine | var %Part | var %Color
set %didLine $did(themes,2,$did(themes,2).sel).text
set %Part $gettok(%didLine, 1, 9)
set %Color $gettok(%Part, 6, 32)
; Place an echo command here for the sake of testing
echo -a %Color : %Part : %didLine
if (%Color == Black) { did -v themes 50 | preview-black }
elseif (%Color == White) { did -v themes 50 | preview-white }
elseif (%Color == Teal) { did -v themes 50 | preview-teal }
elseif (%Color == Blue) { did -v themes 50 | preview-light_blue }
else { did -v themes 50 | nopreview }
}
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
no need for apologyse, you do it volountary and i apreciate it much =) the preview for black/white theme is now good (it shows it in window) but for others it dont. is this perhaps limitation of mirc for not able to show modified colours (palets) ? because Black/White ones are made of basic mirc color palet (default one) and others have modified rgb-s of some colours oh, yes forgot to thank you thank you
Last edited by raZOR; 11/04/06 06:20 PM.
IceCapped
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
the preview for black/white theme is now good (it shows it in window) but for others it dont.
is this perhaps limitation of mirc for not able to show modified colours (palets) ?
because Black/White ones are made of basic mirc color palet (default one) and others have modified rgb-s of some colours
yw, glad to help... I would have to see one of the other color's alias to figure that out (you only posted the black one)...
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
lol stupid me althought it shouldnt matter, coz all aliases are same :P they just got different name for getting right background (or maybe im wrong?) also what puzzles me why 1 theme (called emmerald on list) wont preview, because it does not uses modified rgb colours and uses BLACK background (as Black theme) which should show it
;Teal background
alias preview-teal {
did -v themes 50
var %thm.file themes\ $+ $theme(name) $+ .dom
.unload -a %thm.file
_loadthmfile $did(themes,2,$did(themes,2,1).sel).text
var %rgb = 0 | while (%rgb < 16) { color -r %rgb | inc %rgb }
var %temp = $readini themes\ $+ $theme(name) $+ .dom colours rgb | if (%temp != $null) { _rgb $readini themes\ $+ $theme(name) $+ .dom colours rgb }
window -c @themes
if ($window(@themes) == $null) { window -ph +d @themes 300 200 229 165 | drawfill @themes 0 0 0 0 }
var %. = drawtext -pb @themes 1 0 verdana 10 x
%. 4 $str($chr(160),1) $theme(joinme,#domination) $str($chr(160),7)
%. 16 $str($chr(160),1) $theme(me,$me,is choosing a theme!) $str($chr(160),7)
%. 28 $str($chr(160),1) $theme(nick,$me,Guest376705) $str($chr(160),7)
%. 40 $str($chr(160),1) $theme(notice,NickServ,Password accepted now you can [censored] off!) $str($chr(160),7)
%. 52 $str($chr(160),1) $timestamps $+ $theme(logo) $+ $gettok($readini(system\ $+ $theme(name) $+ .dom,colours,colours),12,44) $+ Can't change Nick while you're banned $str($chr(160),7)
%. 64 $str($chr(160),1) $theme(attention,TCP Alert in port 80 (http) from $IP) $str($chr(160),7)
%. 76 $str($chr(160),1) $theme(quit,rOlling,Quit: Ping timeout) $str($chr(160),7)
%. 88 $str($chr(160),1) $theme(echoaway,Off - away time: 17s) $str($chr(160),7)
%. 100 $str($chr(160),1) $theme(joins,Raptor,domi@raptor.tech.nu) $str($chr(160),7)
%. 112 $str($chr(160),1) $theme(part,$me,id@localhost) $str($chr(160),7)
%. 124 $str($chr(160),1) $theme(metext,$me,Hi! How are you?)
%. 136 $str($chr(160),1) $theme(wsl,pRonEtIvAgO)
%. 148 $str($chr(160),1) $theme(raw311name,pRonEtIvAgO,www.domination.pt.vu)
drawsave @themes themes\thmprvw.bmp
if $dialog(themes) { did -g themes 50 themes\thmprvw.bmp }
.remove themes\thmprvw.bmp
.unload -a themes\ $+ $theme(name) $+ .dom
.load -a %thm.file
var %rgb = 0 | while (%rgb < 16) { color -r %rgb | inc %rgb }
var %temp = $readini themes\ $+ $theme(name) $+ .dom colours rgb | if (%temp != $null) { _rgb $readini themes\ $+ $theme(name) $+ .dom colours rgb }
window -c @themes
}
;Light Blude bckg
alias preview-light_blue {
did -v themes 50
var %thm.file themes\ $+ $theme(name) $+ .dom
.unload -a %thm.file
_loadthmfile $did(themes,2,$did(themes,2,1).sel).text
var %rgb = 0 | while (%rgb < 16) { color -r %rgb | inc %rgb }
var %temp = $readini themes\ $+ $theme(name) $+ .dom colours rgb | if (%temp != $null) { _rgb $readini themes\ $+ $theme(name) $+ .dom colours rgb }
window -c @themes
if ($window(@themes) == $null) { window -ph +d @themes 300 200 229 165 | drawfill @themes 0 0 0 0 }
var %. = drawtext -pb @themes 1 0 verdana 10 x
%. 4 $str($chr(160),1) $theme(joinme,#domination) $str($chr(160),7)
%. 16 $str($chr(160),1) $theme(me,$me,is choosing a theme!) $str($chr(160),7)
%. 28 $str($chr(160),1) $theme(nick,$me,Guest376705) $str($chr(160),7)
%. 40 $str($chr(160),1) $theme(notice,NickServ,Password accepted now you can [censored] off!) $str($chr(160),7)
%. 52 $str($chr(160),1) $timestamps $+ $theme(logo) $+ $gettok($readini(system\ $+ $theme(name) $+ .dom,colours,colours),12,44) $+ Can't change Nick while you're banned $str($chr(160),7)
%. 64 $str($chr(160),1) $theme(attention,TCP Alert in port 80 (http) from $IP) $str($chr(160),7)
%. 76 $str($chr(160),1) $theme(quit,rOlling,Quit: Ping timeout) $str($chr(160),7)
%. 88 $str($chr(160),1) $theme(echoaway,Off - away time: 17s) $str($chr(160),7)
%. 100 $str($chr(160),1) $theme(joins,Raptor,domi@raptor.tech.nu) $str($chr(160),7)
%. 112 $str($chr(160),1) $theme(part,$me,id@localhost) $str($chr(160),7)
%. 124 $str($chr(160),1) $theme(metext,$me,Hi! How are you?)
%. 136 $str($chr(160),1) $theme(wsl,pRonEtIvAgO)
%. 148 $str($chr(160),1) $theme(raw311name,pRonEtIvAgO,www.domination.pt.vu)
drawsave @themes themes\thmprvw.bmp
if $dialog(themes) { did -g themes 50 themes\thmprvw.bmp }
.remove themes\thmprvw.bmp
.unload -a themes\ $+ $theme(name) $+ .dom
.load -a %thm.file
var %rgb = 0 | while (%rgb < 16) { color -r %rgb | inc %rgb }
var %temp = $readini themes\ $+ $theme(name) $+ .dom colours rgb | if (%temp != $null) { _rgb $readini themes\ $+ $theme(name) $+ .dom colours rgb }
window -c @themes
}
Last edited by raZOR; 12/04/06 05:05 PM.
IceCapped
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
I would suggest if they are all the same to change it to a single alias, at the very least it will be easier to debug. If you could place the entire script for this on a website for download and post here the URL, I will take a closer look.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
i tried before that thing with same aliases, and it made big confusion because this theme engine reads background types per alias so it... messes up with single one i guess ok, i uploaded it =) its ~400 kb in size coz of mdx dlls included and some theme images. there are 2 script files in system folder (you will see) which needs load in mirc. link: rzr_themes also, i want to thank you very very much for this. i dont like to bug people =) but i was kinda desperate lol so thank you ^^
IceCapped
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
There were quite a few bugs that needed fixing... Try this out... Themes-Fixed.rarBig changes...* themes-preview.mrc is no longer needed, I consolidated all the "preview-[color]" aliases and moved it to theme-dialog.mrc. * .dom files are now .ini files, mIRC handles .ini files differently and they need to be .ini files (unless you wanted to rewrite a bunch of code) * The sclick event for the listview needed some improvements because the MDX control triggers multiple sclick events. Enjoy , NaquadaBomb
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
heeey i really thank you for your time and effort but unfortunately it doesnt work here when i click on listbox on any theme it previews Black one (in preview window) but always loads Teal one and not any other, also i cannot change themes at all, it always loads just 1 theme (teal one) no matter on which i click/load i use 6.17 for this (clean) does it worked at you ?
Last edited by raZOR; 14/04/06 01:18 PM.
IceCapped
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
ehm disregard all this. it was some problem coz on weird way all theme files were loaded at once :P Naquada this is outstanding work ! i realy dont know how to thank you... i have just 1 question (hope you not angry) everything regarding preview and loading is ok exept on White and LightBlue theme it doesnt show it right (as preview) all others are ok, (on white it gives black bckg and weird colors and on Blue it gives black bckg and all grey colors) just wondering if this is mirc's fault ? or engine (coz its old) ?
Last edited by raZOR; 14/04/06 01:27 PM.
IceCapped
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
Yeah there still seems to be a bug with always showing a black (or existing) background in preview. I think I know why too, I will take another look at the script this weekend.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
hehe oke thank you very much
IceCapped
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
I haven't been able to figure out why the background is always black. And I wont have any time to check it again for at least the next week... Send me your e-mail address to admin@mirc-dll.com, and I'll get back to you as soon as I can.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
done =) & thanks very much
IceCapped
|
|
|
|
|