menu channel {
$iif($dialog(friends),$style(3)) Friends List: {
dialog -dmo friends friends
}
}
Dialog friends {
Title "friends List"
Size -1 -1 124 120
Option dbu
Text "Gogetax Friends List.",1, 4 2 100 32
List 5, 2 39 120 66, sort
Box "",6, 2 36 120 58
Button "&Add",7, 2 97 27 10
Button "&Del",8, 95 97 27 10
Button "&Ok",9, 49 97 27 10, ok
}
on 1:dialog:friends:init:*: {
write FL.Users1.txt
play -cs FL.Users1.txt 0
did -b friends 8
}
on 1:dialog:friends:sclick:5: {
set %FL.sel $did(5,$did(5).sel)
did -e friends 8
}
on 1:dialog:friends:sclick:7: {
set %FL.add $$?="Enter nickname to add:"
write " $+ FL.Users1.txt $+ " did -a friends 5 %FL.add
did -a friends 5 %FL.add
write " $+ FL.Users2.txt $+ " %FL.add
.friends %FL.add
.Echo -a Added %FL.add to friends list!
}
on 1:dialog:friends:sclick:8: {
write -dw $+ "* $+ %FL.sel $+ *" FL.Users1.txt
write -dw $+ "* $+ %FL.sel $+ *" FL.Users2.txt
did -d friends 5 $did(friends,5).sel
did -b friends 8
.friends -r %FL.sel
.Echo -a *** Removed %FL.sel from friends list!
}
on 1:dialog:friends:sclick:9: {
dialog -x friends friends
}
on 1:dialog:friends:close:*: {
unset %FL.*
}