Phone book in MIRC i thought might be usefull.
Again wraith did help me code but i did the rest.
Alias DD2 {
dialog -mdo DD2 DD2
}
dialog DD2 {
title "Dialog"
icon icons\264.ico, 0
size -1 -1 327 205
option pixels notheme
list 1, 1 27 325 100
edit "", 2, 1 109 325 54, vsbar center
button "Add", 3, 3 162 65 25
button "Remove", 4, 72 162 65 25
button "Close", 11, 208 161 65 25
text "By Justin AKA Tweek", 7, 92 188 153 17, center
text "Phone Number's", 8, 113 11 100 17, center
text "Names", 9, 12 11 100 17, center
text "Address", 10, 215 11 100 17, center
}
On *:Dialog:DD2:*:*:{
if ($devent == InIt) {
dd2.read
}
If ($devent == Sclick) {
If ($did = 3) {
write DD2.txt $did(2)
Did -a $dname 1 $did(2)
}
if ($did = 11) {
dialog -x $dname $dname
}
If ($did = 4) {
Write -dl $+ $did(1).sel dd2.txt
did -d $dname 1 $did(1).sel
}
}
}
Alias dd2.read {
var %x 1
While (%x <= $lines(dd2.txt)) {
Did -a DD2 1 $Read(DD2.txt,%x)
Inc %x
}
}
also for ur close button no need to do
if ($did = 11) {
dialog -x $dname $dname
}
if you do ur button like so
button "Close", 11, 208 161 65 25, cancel
you can also do the open alias like this
Alias DD2 dialog $iif($dialog(DD2),-v,-mdo DD2) DD2
just so you dont get anyone bitching about a open error
you should as well add some checks if anything is entered to add or remove so it wont error on that as well.
Remember to add error checks when making a snippet. Think of any/everything that can an will go wrong with it.
checks as in if name, phone number, and address is entered.
when you say "Again wraith did help me code but i did the rest." what is the rest that you did, and what is the code wraith did?
One more thing you may want to add a scroll bar cuz if you input all the info you cant read it all without scrolling.
4/10