The ON Close event only triggers, and is only suppose to trigger when the window is closed manually, this not only stops "loops" if your script, /window -c's and On Close reopens' it.. but its also logically because, theres nothing stopping you doing:
/window -c @name
dothiscommandhere
As that will have the same effect as:
On *:close:@name:{
dothiscommandhere
}
Eamonn.