closing scriptwindow