I would recommend using /loadbuf and /savebuf instead of reading and writing the lines one by one. It's a lot faster and looks prettier.

Code:
dialog info {
  title Info
  size -1 -1 150 110
  option dbu
  edit , 1 , 10 10 130 80, multi return
  button "Done", 3, 10 95 40 12, ok
}

alias info dialog $iif($dialog(info),-c,-m) info info

on *:dialog:info:*:*: {
  if ($devent == init) && ($isfile(info.txt)) loadbuf -o info 1 info.txt
  elseif ($devent == close) savebuf -o info 1 info.txt
}

Last edited by Dazuz; 31/12/15 03:09 PM.