Ok Now you got that, here's a little more optimizing for you smile

You can use filter here with the -o switch
Code:
on *:dialog:MainMenu:init:*: {
  filter -fo loaded.txt MainMenu 10 *

Then loop through the listbox with $did()
Code:
  var %i = 1
  while ($did(MainMenu,10,%i)) {
    var %a = $v1
    if ($readini(bots.ini,%a,connected) == connected) { did -o MainMenu 10 %i %a (C) }
    inc %i
  }
}


Consider using a hash table for this, especially the 'is connected' part. wink