This may be really lame idea but has anyone tried to wrap a standard Mac application (like Mail) inside an Applescript program? The idea is it would filter events and allow arbitrary additions to existing applications. The key would be to somehow set things up so that any window that the application creates would actually appear as part of the applescript application. So a key stroke or a button being sent to it would first go to the applescript program. The event (or sequence of events) would be looked up in a list. The default would be just to pass on all of the events. But if a match was found, then the applescript program could do whatever was specified in the list.