how close gui without exiting script?
i have script runs every 10 minutes , call gui whenever few variables change in script, when close gui, application closed too. tried adding -command {destroy .} same thing exit command in tk, here script
lappend auto_path "/bin/gui/scripts" package require scriptgui monitor /bin/files/folder1 /bin/files/folder2 set 0 while {i < 1} { after 600000 script } the gui proc called inside script proc whenever variables in script proc changes
to make window go away without destroying (and ending application) use wm withdraw on toplevel.
# assuming you're using default 1 wm withdraw . you can intercept request close window (via wm protocol) , handle withdrawing:
wm protocol . wm_delete_window { wm withdraw . } however, if make sure provide other way have process exit real (assuming you're making normal application); it's frustrating users have no way close program down , make go away.