From: gabriele renzi Date: 2002-09-09T12:06:56+09:00 Subject: Re: Equivalent of pascal's keypressed ? > I'd also like to know if there is a way to trap the > user pressing Ctrl-C > and do some stuff before closing ? you should use something like trap "SIGINT" { block_to_do (some, stuff)} ^C in unix sends SIGINT , tipically. You could even try at_exit { endBlock } In this way you'll have endBlock anyway. I suppose that trap SIGINT won't work in dos, but you could do something like this to check if the program actually ended or had been interrupted #start #good end $ended=TRUE at_exit { unless $ended end } ______________________________________________________________________ Yahoo! Musica: notizie, recensioni, classifiche, speciali multimediali http://it.yahoo.com/mail_it/foot/?http://it.music.yahoo.com/