But there's no need to change the Default Account if all you want to do is change the actual account of the message you're sending. I.e., the manual way to do this is to File/New/Mail Message (or cmd-opt-N, or cmd-N), then flip the "From:" popup to the account you want. Simple.
And – yes – this can be done extremely simply from an AppleScript. It's easiest if you make your own, and hardcode in the names of your accounts. It's also essential to specify in the script whether each account is a POP, IMAP, Hotmail, or Exchange account. You know that, but I don't, so just adjust the script below. Due to an ancient design of the Entourage script menu (so that it will still work in Jaguar), scripts made in Panther and Tiger Script Editor do not preserve changes to script properties, so we need to include a line that makes it figure out every time which account is your default account, And due to an Entourage bug, that will error in some versions if it's an Exchange account, so if you've got an Exchange account, let me know and I'll adjust it. I'm going to assume from your "toggle" phrasing that we're dealing with only two possible accounts here.
tell application "Microsoft Entourage"
if class of window 1 ≠ draft window then
beep
return --quit
end if
set def to default mail account
if def = POP account "Name 1" then
set account of window 1 to POP account "Name 2"
else
set account of window 1 to POP account "Name 1"
end if
end tell
Put in the right names for your two accounts, and change POP to IMAP if appropriate, Ask me what to do if Exchange. When you run this script and want to change from whatever happens to be the default account to the other one, it will do it.
First go to Help and read up on "About the script menu" to choose a keyboard shortcut – and make sure you pick one not already taken by Entourage. using Control key (including in conjunction with Command key) is pretty safe – there aren't too many taken. For example, let's pick control-command-Z, which is easy to press with left hand, (ctrl-cmd-A scrolls the message to the top, so that's no good. Control-z is also fine, but you might press cmd-Z by mistake.) So
Switch Account \cmZ
would be a name that would work (as would Switch Account \cZ ) . Copy and paste the script above into Script Editor. Click Compile, then File/Save and save it as a Script (the default) named Switch Account \cmZ or whatever, with or without the .scpt extension. Save it to the Entourage Script Menu Items folder in the Microsoft User Data folder in your user Documents folder.
Now you'll see the script name appear, with its keyboard shortcut suitably transmogrified into the usual symbols, in the Entourage script menu. When you have a new message window up, press the keyboard shortcut, and watch the "From" change. If you have any other type of window up (main window, received message, contact window, etc) and you press the key combo by accident, it will just beep at you.
From: Francis Hookham <fh.2...@ntlworld.com>
Newsgroups: microsoft.public.mac.office.entourage
Date: Sun, 16 Oct 2005 09:51:34 +0100
Subject: Re: Default account