This is my very first dialog. I was trying it out to see if I could figure dialogs out. And I decided to make a color text script so you can choose a color for your text, as well as bold or no bold.
It's pretty simple to use, all you do is either right click and select "Max's Color Text Settings" or type /ctext. And on the dialog, just type in a color without the ctrl+k (Example: 15,2 or 7).. check bold or underline boxes for bold and/or underline. Then click okay. Now your text will be the color you chose. I added a color index on the dialog so you can see the color numbers for reference. =]
[b]Changes in version 2:
Changes in version 2.5:
Screenshot:
[b]Color Index Image:
Just save that in the mIRC directory as "ColorIndex.png" without the quotes.[/b]
;~~~~~~~~~~~~~~~~~~~~~~~~~;
; Max's Color Text v2.5 ;
; By: Max Evans ;
; irc.geekshed.net ;
;#GeekUnderground & #Chris;
;~~~~~~~~~~~~~~~~~~~~~~~~~;
dialog MCT {
title "Max's Color Text v2.5"
size -1 -1 112 116
option dbu
button "Okay", 4, 43 102 26 9, ok
box "Text Properties", 5, 10 27 93 36
edit "", 6, 56 37 30 10
icon 9, 13 73 87 20, ColorIndex.png, 0, noborder
box "Color Index", 10, 10 65 93 33
text "Color Code", 18, 28 38 28 6
box "Turn Script On/Off", 22, 10 2 93 23
radio "On", 23, 29 11 19 10, group
radio "Off", 24, 61 11 20 10
check "Bold", 29, 28 50 20 7, left
check "Underline", 30, 53 50 32 7, left
}
on *:DIALOG:MCT:init:0:{
did -c $dname $iif(%mct.on,23,$iif(%mct.off,24,))
$iif(%text.color,did -a $dname 6 %text.color)
if (%mctbold = ) { did -c $dname 29 }
if (%mctunderline = ) { did -c $dname 30 }
}
on *:DIALOG:MCT:sclick:*:{
if ($did == 4) {
if ($did(MCT,29).state = 1) { set %mctbold } | else { unset %mctbold }
if ($did(MCT,30).state = 1) { set %mctunderline } | else { unset %mctunderline }
set %text.color $did(MCT,6)
}
if ($did == 23) { enable #mctext | unset %mct.* | set %mct.on on }
if ($did == 24) { disable #mctext | unset %mct.* | set %mct.off off }
}
#mctext on
on *:input:*:if (!$regex($1-,^\/) && !$inpaste) { msg $active %mctunderline $+ %mctbold $+ $+ %text.color $+ $1- | halt }
#mctext end
menu * {
.Max's Color Text Settings: { dialog -m MCT MCT }
}
alias ctext {
$iif($dialog(MCT),dialog -c MCT MCT) dialog -m MCT MCT
}
like the new settings!
apparently, according to mIRC theres an error in these lines:
did -c $dname $iif(%bold.on,20,$iif(%bold.off,21,))
did -c $dname $iif(%mct.on,23,$iif(%mct.off,24,))
did -c $dname $iif(%underline.on,25,$iif(%underline.off,26,))
i think the comma (,) after the (%underline.off,26,), etc causes it, as removing it stops it, but im not great at scripting so cant be sure :S
Cool man, works much better.
Edit: Never mind
Though you can change one thing:
if ($did == 25) { unset %underline.* | set %underline.on }
if ($did == 26) { unset %underline.* | set %underline.off none }
Instead of using variables to indicate whether a radio is checked, unchecked, or whichever is checked, you can use $did(name,id).status to do it without the use of variables.
Looks ok at a glance. Nice approach on avoiding the usual colour selecting method. You might want to add italic and underline to the dialogue also. Plus try and see if it is possible to make the text and background colours selectable from use of radio or check buttons to make it easier rather than the number comma number currently in use