Mail.app: Object Properties In An Existing Window

Hi,

I am trying to genenerate an new HTML message in Mail.app by scripting Safari with the following:

tell application “Safari”
activate
tell application “System Events”
tell process “Safari”
keystroke “i” using {command down}
end tell
end tell
end tell

This works fine. A new message is created in Mail.app as the frontmost window.

How do I set up an object reference to the message created by Safari in Mail.app so I can reference it’s properties? (ie. subject, body, attachments). What command would
put an existing new outgoing message in a variable? Most likely this would be the frontmost window.

The line below creates another new message.

I want to do the same thing, but with an existing message.

Thanks

its will be message 1 in out going message

Moving to OS X…

Does this work for anyone?