Do you find it annoying when you need to remember a word,nick,password,line,ect and you are sick of opening windows notepad well if so this snippet may help :P
Its a little IRC notepad ive made that uses a txt file to store the info.
You can add and delete any part of the txt file from the dialog :D
to use just copy and paste to remotes (alt+r)
Special thanks to mountaindew and JacK SpaRRoW for helping with parts of this code, Thanks guys :D
Have fun :P
Menu channel {
IRC NOTEPAD: dialog $iif($dialog(Npad),-v,-m) Npad Npad
}
on *:dialog:Npad:init:*:{
var %x = 1
while %x <= $lines(Npd.txt) {
did -a $dname 3 $read(Npd.txt,%x)
inc %x
}
}
dialog Npad {
title "IRC NOTEPAD"
size -1 -1 190 241
option dbu
button "ADD", 1, 52 7 37 12, ok
button "Delete", 2, 97 7 37 12, ok
combo 3, 8 22 173 131, size hsbar vsbar
button "OK/Cancel", 4, 75 153 37 12, ok cancel
text "Help:", 5, 11 177 25 8
text "To ADD a word/line type the word/line in the top box and press [ADD] To Delete a word/line click the word/line from the list and hit delete :P.", 6, 11 187 169 35
link "IRC NOTEPAD By Gemster", 7, 63 231 66 8
box "", 8, 9 173 173 48
box "", 9, 5 1 179 167
}
on *:DIALOG:Npad:sclick:1:{ write Npd.txt $did(3) }
on *:DIALOG:Npad:sclick:2:{ write -ds " $+ $did(3) $+ " Npd.txt }
i have some suggestions:
1) Dialog is too big, too much space
2) Disable the delete button until you click a thing in the combo
3) I would turn the init event into an alias, and call that on the init, and then call it again when u delte something (to update the list), and same for when you add something
4) Disable the add button until you have text in the edit box