Positioning cursor in Mail

For Apple Mail: I’ve got a simple script that creates a new message and sets up the recipients and file attachments but unfortunately the cursor (or active field, focus, etc) remains stuck in the To address. Is there some way I can force the cursor to move to the message body so it’s ready for the user to start typing the message when the window is made visible? TIA!

I don’t think there’s a “clean” way to do this. If you’re willing to enable GUI scripting, try the following after you create the message:


tell application "Mail" to activate
tell application "System Events"
	tell process "Mail"
		keystroke "t" using shift down
	end tell
end tell

That will send a shift-tab keystroke which, regardless of how many fields you usually show in your messages (e.g. Bcc:, etc), should take you back to the message text.

Daniel Jalkut