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
}
}
alias ac {
dialog -dm addchan addchan
}
dialog addchan {
; === Window ===
title "Script Setup"
size -1 -1 261 224
button "OK",1,16 194 73 21, OK
button "Cancel",2,97 194 73 21
button "Help",3,178 194 73 21
; ==============
}