Dialog Blocnote { title Blocnote size -1 -1 500 300 option pixels edit "", 1, 2 2 498 298, multi, return, hsbar, vsbar } on *:dialog:Blocnote:init:0:{ if ($lines(Blocnote.txt) > 0) { set %i 1 while (%i <= $lines(Blocnote.txt)) { did -i $dname 1 %i $read(Blocnote.txt,%i) inc %i } } } on *:dialog:Blocnote:edit:1:{ write -c Blocnote.txt var %i = 1 while ( %i < $did(1).lines ) { write -l $+ %i Blocnote.txt $did(1,%i).text inc %i } }