Ok, thanks Locutos for the help.

Sorry, i must of missed the ok cancel on the button, i did use dialog studio to create the dialog with.

I copied the code and it doesnt work, heres what i have now

Code:
dialog comby {
  title ""
  size -1 -1 124 86
  option dbu
  button "CLOSE", 1, 2 2 37 12, ok
  button "ADD", 2, 2 20 37 12
  button "DELETE", 3, 2 32 37 12
  combo 4, 40 2 80 80, sort edit drop
}

; when you click on the CLOSE button
on *:dialog:comby:sclick:1: {
  ; find out how many entries there are
  var %i = $did(comby,4).lines
  ;read from line last backwards
  while (%i) {
    ; write the line to file, make sure it's not empty!
    if ($did(comby,4,%i).text) write filename.txt $did(comby,4,%i).text
    dec %i
  }
}

; when you open the dialog GUI
on *:dialog:comby:init:*: {
  ; if your saved file exists
  if ($exists(filename.txt)) {
    ; find out how many lines there are
    var %i = $lines(filename.txt)
    ; and write them all
    while (%i) {
      did -a $dname 4 $read(filename.txt,%i)
      dec %i
      }
   }
}



It`s not adding anything to the text file, it doesnt show anything, i dont know whats up confused
I tried creating a blank text file, even put it in my scripts folder

ShadowDemon