Although I'm not not to programming for mIRC, I am new to working with dialog boxes as I previously had no use for them and my clients did not need to use them, therefore until now, I have not delved into them previously.
alias ss {
dialog -dm setup setup
}
dialog setup {
; === Window ===
title "Script Setup"
size -1 -1 420 335
button "OK",1,145 307 73 21, OK
button "Cancel",2,226 307 73 21
button "Help",3,307 307 73 21
; ==============
box "Personal Preferences",4, 3 3 493 293
combo 5,128 60 185 210,sort
button "Add",6, 323 83 73 21
button "Edit",7, 323 112 73 21
button "Delete",8, 323 141 73 21
button "Reset List",9, 323 170 73 21
}
alias -l update.setup {
did -r setup 5
set %temp.total $count(%setup.list,$chr(44))
set %temp.count 0
:start
inc %temp.count 1
did -a setup 5 $gettok(%setup.list,%temp.count,44)
if (%temp.count < %temp.total) { goto start }
}
on *:DIALOG:setup:edit:*: {
if ($did == 5) {
set %setup.temp.channel $did(5).text
}
}
on *:DIALOG:setup:sclick:*: {
; ====== Channel List Btn's ======
; === Add ===
if ($did == 6) {
set %setup.list %setup.list $+ %setup.temp.channel $+ ,
update.setup
}
; === Edit ===
if ($did == 7) {
}
; === Delete ===
if ($did == 8) {
set -u3 %setup.tc %setup.channel.selected $+ ,
set %setup.list $remove(%setup.list,%setup.tc)
update.setup
}
; === Reset ===
if ($did == 9) {
unset %setup.list
update.setup
}
}
I'm trying to make a dialog which functions the same as the options window for adding a new server, however this is to add a new channel whereas I'd actually want there to be no text input on the version above, but instead another dialog open upon clicking on add or edit.
The above would simply be an additional question of which would save myself time setting up another question on here, however my current problem which leads onto this is that upon clicking to delete a channel, no channel deletes and instead the current list merges.
Thank you for any help and/or advice and for providing any time to follow up my question.
Best Regards, Tim