on *:TEXT:mtgrules*:$( $+ %rules.chans $+ ): {
var %trtimer 1
var %trtime 500
var %trtime2 2
while ( $read( $scriptdirmtgrules.list.txt,%trtimer ) != $null ) { .timer -m 1 %trtime /.notice $nick %trtimer $+ : $+ $read($scriptdirmtgrules.list.txt,%trtimer)
var %trtime $calc(%trtime * %trtime2)
inc %trtimer
}
}
On *:Dialog:mtgal:Sclick:5,6:{
If ( $did == 5 ){ /did -a mtgal 1 $did(1,0)
If ( $did == 6 ){ /did -d mtgal 1 $did(1).sel
}
on *:Dialog:mtgal:Sclick:7,8:{
If ( $did == 7 ){ /did -a mtgal 2 $did(2,0) | /write -c $scriptdirmtgRules.chans.txt $didtok(mtgal,2,44)
If ( $did == 8 ){ /did -d Rules 2 $did(2).sel | /write -c $scriptdirmtgRules.chans.txt $didtok(mtgal,2,44)
}
on *:Dialog:mtgals:close:0:{
/write -c $scriptdirmtgrules.list.txt
var %temp 1
while ( $did(1,%temp) != $null ) { /write $scriptdirmtgrules.list.txt $did(1,%temp)
inc %temp
}
/set %mtgRules.chans $did(2,1) $+ , $+ $did(2,2) $+ , $+ $did(2,3) $+ , $+ $did(2,4)
/write -l1 $scriptdirmtgrules.chans.txt $did(2,1) $+ , $+ $did(2,2) $+ , $+ $did(2,3) $+ , $+ $did(2,4)
}

on *:Dialog:mtgal:Init:0:{
var %t.r.l 1
while ( $read( $scriptdirmtgrules.list.txt,%t.r.l ) != $null ) { /did -a Rules 1 $read( $scriptdirmtgrules.list.txt,%t.r.l )
inc %t.r.l
}
didtok mtgal 2 44 $read -l1 $scriptdirmtgrules.chans.txt
}
dialog mtgal {
title "MTG Auto-Lister Script"
size -1 -1 311 199
option dbu
tab "Channel Rules", 1, 2 12 292 160
combo 1, 9 62 191 85, tab 1 size, edit
combo 2, 222 44 60 50, tab 1 size, edit
text "Channels", 3, 238 31 25 8, tab 1
text "Channel Rules", 4, 79 49 37 8, tab 1
button "ADD RULE", 5, 59 150 37 12, tab 1
button "DELETE RULE", 6, 116 150 41 13, tab 1
button "Add", 7, 226 96 23 12, tab 1
button "Delete", 8, 254 96 26 12, tab 1
tab "Server Requirements", 2
combo 9, 14 60 188 89, tab 2 size
combo 10, 223 43 60 50, tab 2 size
button "ADD RULE", 11, 47 153 37 12, tab 2
button "DELETE RULE", 12, 106 153 40 12, tab 2
button "Add", 13, 227 98 26 12, tab 2
button "Delete", 14, 258 98 22 12, tab 2
text "Channels", 15, 239 31 25 8, tab 2
text "Serving Requirements", 16, 78 48 57 8, tab 2
tab "New Movies", 3
combo 17, 12 66 167 78, tab 3 size
combo 18, 222 43 60 50, tab 3 size
button "ADD MOVIE", 19, 31 148 37 12, tab 3
button "DELETE MOVIE", 20, 97 148 44 12, tab 3
button "Add", 21, 226 96 19 12, tab 3
button "Delete", 22, 250 96 28 12, tab 3
text "Channels", 23, 238 31 25 8, tab 3
text "New Movie Listings", 24, 62 52 50 8, tab 3
button "Cancel", 28, 243 185 37 12, cancel
button "OK", 29, 168 185 37 12, ok
button "HELP", 30, 5 185 37 12

this is basicly what i would like to do and look like. i want the script to wright the file with thr ules, exc stored and then activated when triggered.. as you can see there are milti setups in this dialog, i want to be able to edit three things from this file..... but i need some advice on how to blend it nicely and make it work..