;; /note - test it
alias note dialog - $+ $iif($dialog(note),v,dm) note note
dialog note {
title "Notes [/note]"
option -dbu
size -1 -1 400 300
edit "",1, 0 0 400 300,hsbar vsbar autohs autovs multi return
button "",2,0 0 0 0 ,hide cancel
}
on 1:dialog:note:init:0:{ if ($exists(note.txt)) { loadbuf -o note 1 note.txt } }
on 1:dialog:note:sclick:2:{ .write -c note.txt | .savebuf -o note 1 note.txt | if (!$read(note.txt,$lines(note.txt))) write -dl $+ $readn note.txt }