This is just a snip off of one of my scripts using Drop down boxes


Menu channel,menubar,query,status {
Color Nick:dialog -mo dcn dcn
}
dialog dcn {
title "Color Nick"
size -1 -1 162 84
option dbu
box "Nick Colors ", 1, 1 0 74 68
box "Other Colors ", 2, 74 0 87 68
box "", 3, 1 64 160 19
combo 4, 4 7 35 70, drop
check "OPed", 5, 41 9 30 10
combo 6, 4 19 35 70, drop
check "Half-OP", 7, 41 21 30 10
combo 8, 4 31 35 70, drop
check "Voiced", 9, 41 32 30 10
combo 10, 4 43 35 70, drop
check "Regular", 11, 41 44 30 10
combo 12, 4 55 35 70, drop
check "My Nick", 13, 41 55 30 10
combo 14, 77 7 35 70, drop
check "IRCops", 15, 114 9 30 10
combo 16, 77 19 35 70, drop
check "Away", 17, 114 21 30 10
combo 18, 77 31 35 70, drop
check "Brackets Color", 19, 114 32 45 10
combo 20, 77 43 35 70, drop
check "Nick Brackets", 21, 114 44 45 10
combo 22, 77 55 35 70, drop
check "Nick Color", 23, 114 55 45 10
button "Create Brackets", 24, 76 70 46 10
button "On/Off", 25, 4 70 35 10
button "Cancel", 26, 123 70 35 10, cancel
button "Update", 27, 40 70 35 10, ok
}
on *:dialog:dcn:*:*:{
if ($devent == init) {
if ($did == 0) {
if (%on.chk == 1) did -c dcn 5
if (%hn.chk == 1) did -c dcn 7
if (%nv.chk == 1) did -c dcn 9
if (%vn.chk == 1) did -c dcn 11
if (%mn.chk == 1) did -c dcn 13
if (%ic.chk == 1) did -c dcn 15
if (%an.chk == 1) did -c dcn 17
if (%chr.chk == 1) did -c dcn 19
if (%brk.chk == 1) did -c dcn 21
if (%nic.chk == 1) did -c dcn 23
dcnon4 | dcnhn6 | dcnvn8 | dcnnv10 | dcnmn12 | dcnic14 | dcnan16 | dcnchr18 | dcnbrk20 | dcnnic22
}
}
if ($devent == sclick) {
if ($did == 4) { if ($did(4).seltext) { set %on.clr $did(4).seltext | dcnon4 } }
if ($did == 6) { if ($did(6).seltext) { set %hn.clr $did(6).seltext | dcnhn6 } }
if ($did == 8) { if ($did(8).seltext) { set %vn.clr $did(8).seltext | dcnvn8 } }
if ($did == 10) { if ($did(10).seltext) { set %nv.clr $did(10).seltext | dcnnv10 } }
if ($did == 12) { if ($did(12).seltext) { set %mn.clr $did(12).seltext | dcnmn12 } }
if ($did == 14) { if ($did(14).seltext) { set %ic.clr $did(14).seltext | dcnic14 } }
if ($did == 16) { if ($did(16).seltext) { set %an.clr $did(16).seltext | dcnan16 } }
if ($did == 18) { if ($did(18).seltext) { set %chrl.clr $did(18).seltext | set %chrr.clr $did(18).seltext | dcnchr18 } }
if ($did == 20) { if ($did(20).seltext) { set %brk.clr $did(20).seltext | dcnbrk20 } }
if ($did == 22) { if ($did(22).seltext) { set %nic.clr $did(22).seltext | dcnnic22 } }
if ($did == 24) { set %chrl.chk $$?="Enter Left Bracket W/Color" | if $?!="Would you like set the right Bracket like the left?" == $true { set %chrr.chk %chrl.chk } | else { set %chrr.chk $$?="Enter Right Bracket W/Color" } }
if ($did == 27) { set %on.chk $did(5).state | set %hn.chk $did(7).state | set %vn.chk $did(9).state | set %nv.chk $did(11).state | set %mn.chk $did(13).state | set %ic.chk $did(15).state | set %an.chk $did(17).state | set %chr.chk $did(19).state | set %brk.chk $did(21).state | set %nic.chk $did(23).state }
}
}
alias -l dcn { dialog -mdo dcn dcn }
alias -l dcnhn6 {
did -c dcn 6 %hn.clr
did -a dcn 6 1 White | set %dcnhn 0
did -a dcn 6 2 Black | set %dcnhn 1
did -a dcn 6 3 Dk Blue | set %dcnhn 2
did -a dcn 6 4 Green | set %dcnhn 3
did -a dcn 6 5 Red | set %dcnhn 4
did -a dcn 6 6 Maroon | set %dcnhn 5
did -a dcn 6 7 Purple | set %dcnhn 6
did -a dcn 6 8 Orange | set %dcnhn 7
did -a dcn 6 9 Yellow | set %dcnhn 8
did -a dcn 6 10 Lt Green | set %dcnhn 9
did -a dcn 6 11 Teal | set %dcnhn 10
did -a dcn 6 12 Cyan | set %dcnhn 11
did -a dcn 6 13 Blue | set %dcnhn 12
did -a dcn 6 14 Pink | set %dcnhn 13
did -a dcn 6 15 Dk Grey | set %dcnhn 14
did -a dcn 6 16 Lt Grey | set %dcnhn 15
}


Last edited by Othello; 01/11/03 11:12 PM.