Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: control-C programatically?
Date: Thu, 17 Sep 2009 03:08:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 2
Message-ID: <h8s96i$9f9$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1253156882 9705 172.30.248.38 (17 Sep 2009 03:08:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 17 Sep 2009 03:08:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 176224
Xref: news.mathworks.com comp.soft-sys.matlab:570968


I want to create a shortcut that when you presses it, cntrl-C (aborts the current script) then runs some cleanup code (sort of like the "finally" block of code in java).  
But how to Control-C programatically?