Object Properties In An Existing Window


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

tell application “Safari”
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 as the frontmost window.

How do I set up an object reference to the message created by Safari in 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.


its will be message 1 in out going message

Moving to OS X…

Does this work for anyone?