Changed the code for opening and closing the Main window and for obtaining the current identity into raw event code. This prevents AppleScript from asking you to locate "Outlook Express" or "Microsoft Entourage" if you do not have it installed. The bad side effect of this is that you have to edit some parts of the script each time you save the script, or the script will generate errors the next time you run it. If you edit the script, please read the IMPORTANT NOTICE at the top of the script and follow the instructions for best results.